Article 5M7Q1 mkinitrd deletes current directory contents if it cannot create tmp dir

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.latest?d=yIl2AUoC8zA latest?i=_nLnpM45rMY:cwfdP6SFvsc:F7zBnMy latest?i=_nLnpM45rMY:cwfdP6SFvsc:V_sGLiP latest?d=qj6IDK7rITs latest?i=_nLnpM45rMY:cwfdP6SFvsc:gIN9vFw_nLnpM45rMY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments