--- init.d/halt.sh 2004-07-15 15:24:04.927488662 +0900 +++ init.d/halt.sh 2004-07-15 15:25:12.422104296 +0900 @@ -22,8 +22,22 @@ then ebegin "Saving device nodes" cd /dev - try tar -jclpf "/tmp/devices-$$.tar.bz2" * + # A few extras, to *not* save sysfs-aware devices + find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- > /tmp/devices.real.$$ + # add a few of my own + udevinfo -d | awk '/^N|S: ..*/ { i=1; while (i++ /tmp/devices.udev.$$ + cat <>/tmp/devices.udev.$$ +stdin +stdout +stderr +core +fd +initctl +EOF + try tar -jclpf "/tmp/devices-$$.tar.bz2" \ + `fgrep -x -v -f /tmp/devices.udev.$$ < /tmp/devices.real.$$` try mv -f "/tmp/devices-$$.tar.bz2" /lib/udev-state/devices.tar.bz2 + try rm -f /tmp/devices.{real,udev}.$$ eend 0 fi