While performing rescue jobs in a chroot (changing rootfs type): # mkinitrd --help /sbin/mkinitrd: line 1557: cannot create temp file for here document: No such file or directory # set | grep T.*MP TMP=/tmp/.private/root TMPDIR=/tmp/.private/root # ls /tmp/.private/root ls: cannot access /tmp/.private/root: No such file or directory Indeed.
(In reply to comment #0) > While performing rescue jobs in a chroot (changing rootfs type): This is not a regular operation, right? > # mkinitrd --help > /sbin/mkinitrd: line 1557: cannot create temp file for here document: No such file or directory > > # set | grep T.*MP > TMP=/tmp/.private/root > TMPDIR=/tmp/.private/root > # ls /tmp/.private/root > ls: cannot access /tmp/.private/root: No such file or directory > > Indeed. There are many ways to fool yourself. Try "env TMPDIR= chroot" next time.
(In reply to comment #1) > > While performing rescue jobs in a chroot (changing rootfs type): > This is not a regular operation, right? It is one of operations when: - the stress is usually above usual; - weird diagnostics don't really help. > > # mkinitrd --help > > /sbin/mkinitrd: line 1557: cannot create temp file for here document: No such file or directory > > ls: cannot access /tmp/.private/root: No such file or directory > There are many ways to fool yourself. > Try "env TMPDIR= chroot" next time. I'll sure forget it 'till next time. Rather wanted to draw your attention to the fact that corner cases like this do matter; is it unreasonable to request that directory existence[/writability] check be performed before setting TMP/TMPDIR?
Lets handle this issue in chroot(1).
Thanks in advance!
6.11-alt1-2-gc4aa447
Your advance has arrived :-)