mkinitrd deletes current directory contents if it cannot create tmp dir
by Andypoo from LinuxQuestions.org on (#5M7Q1)
Hi, just had a rather unfortunate experience whilst attempting to recover a system where mkinitrd destroyed the contents of my /boot dir.
Basically, if mktemp fails (which it did in my case as /tmp didn't exist), then PRFX is nothing, and this:
rm ${PRFX}*
destroys the contents of the current directory. Would be good to avoid this.
Basically, if mktemp fails (which it did in my case as /tmp didn't exist), then PRFX is nothing, and this:
rm ${PRFX}*
destroys the contents of the current directory. Would be good to avoid this.