aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2000-07-26 14:20:01 +0000
committerBill Nottingham <notting@redhat.com>2000-07-26 14:20:01 +0000
commit7b63c0ef78528a50b6733a2e9d6250d223c7ed43 (patch)
treec481aa5fdf7b1615c68af07a0fbf1f6b989bc88b /rc.d/init.d/halt
parent820e76ea9962ba84c26a9af1419deefa192741b5 (diff)
downloadinitscripts-7b63c0ef78528a50b6733a2e9d6250d223c7ed43.tar
initscripts-7b63c0ef78528a50b6733a2e9d6250d223c7ed43.tar.gz
initscripts-7b63c0ef78528a50b6733a2e9d6250d223c7ed43.tar.bz2
initscripts-7b63c0ef78528a50b6733a2e9d6250d223c7ed43.tar.xz
initscripts-7b63c0ef78528a50b6733a2e9d6250d223c7ed43.zip
fix unclean shutdown
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt6
1 files changed, 3 insertions, 3 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 7db1c206..fc463b21 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -99,9 +99,7 @@ if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
#runcmd "Turning off RAID" /sbin/raidstop -a
fi
-[ -d /proc/bus/usb ] && umount /proc/bus/usb
-
-runcmd "Unmounting proc file system" umount /proc
+[ -f /proc/bus/usb/devices ] && umount /proc/bus/usb
# Remount read only anything that's left mounted.
#echo "Remounting remaining filesystems (if any) readonly"
@@ -109,6 +107,8 @@ mount | awk '/ext2/ { print $3 }' | while read line; do
mount -n -o ro,remount $line
done
+runcmd "Unmounting proc file system" umount /proc
+
# Now halt or reboot.
echo "$message"
if [ -f /fastboot ]; then