/[baselayout]/branches/rc-scripts-1_6/init.d/halt.sh
Gentoo

Diff of /branches/rc-scripts-1_6/init.d/halt.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1280 Revision 1281
24then 24then
25 ebegin "Saving device nodes" 25 ebegin "Saving device nodes"
26 # Handle our temp files 26 # Handle our temp files
27 devices_udev=$(mktemp /tmp/devices.udev.XXXXXX) 27 devices_udev=$(mktemp /tmp/devices.udev.XXXXXX)
28 devices_real=$(mktemp /tmp/devices.real.XXXXXX) 28 devices_real=$(mktemp /tmp/devices.real.XXXXXX)
29 devices_totar=$(mktemp /tmp/devices.totar.XXXXXX)
29 device_tarball=$(mktemp /tmp/devices-XXXXXX) 30 device_tarball=$(mktemp /tmp/devices-XXXXXX)
30 31
31 if [[ -z ${devices_udev} || -z ${devices_real} || \ 32 if [[ -z ${devices_udev} || -z ${devices_real} || \
32 -z ${device_tarball} ]]; then 33 -z ${device_tarball} ]]; then
33 eend 1 "Could not create temporary files!" 34 eend 1 "Could not create temporary files!"
56 }' > "${devices_udev}" 57 }' > "${devices_udev}"
57 # These ones we also do not want in there 58 # These ones we also do not want in there
58 for x in MAKEDEV core fd initctl pts shm stderr stdin stdout; do 59 for x in MAKEDEV core fd initctl pts shm stderr stdin stdout; do
59 echo "${x}" >> "${devices_udev}" 60 echo "${x}" >> "${devices_udev}"
60 done 61 done
61 tarball_devices="$(fgrep -x -v -f "${devices_udev}" < "${devices_real}")" 62 fgrep -x -v -f "${devices_udev}" < "${devices_real}" > "${devices_totar}"
62 # Now only tarball those not created by udev if we have any 63 # Now only tarball those not created by udev if we have any
63 if [[ -n ${tarball_devices} ]]; then 64 if [[ -s ${devices_totar} ]]; then
64 try tar -jclpf "${device_tarball}" ${tarball_devices} 65 try tar -jclpf "${device_tarball}" -T "${devices_totar}"
65 try mv -f "${device_tarball}" /lib/udev-state/devices.tar.bz2 66 try mv -f "${device_tarball}" /lib/udev-state/devices.tar.bz2
66 try rm -f "${devices_udev}" "${devices_real}" 67 try rm -f "${devices_udev}" "${devices_real}"
67 else 68 else
68 rm -f /lib/udev-state/devices.tar.bz2 69 rm -f /lib/udev-state/devices.tar.bz2
69 fi 70 fi

Legend:
Removed from v.1280  
changed lines
  Added in v.1281

  ViewVC Help
Powered by ViewVC 1.1.20