aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-09-03 23:41:31 +0000
committerBill Nottingham <notting@redhat.com>2003-09-03 23:41:31 +0000
commit48eb30850210f0aa500768ee11af63160dbbcff4 (patch)
tree81173819d5128101f3abdcb77f9fdb115d8f184f /rc.d/init.d/halt
parent5c438b1b4a470d5fba3b9a256223a6f3b6dbb933 (diff)
downloadinitscripts-48eb30850210f0aa500768ee11af63160dbbcff4.tar
initscripts-48eb30850210f0aa500768ee11af63160dbbcff4.tar.gz
initscripts-48eb30850210f0aa500768ee11af63160dbbcff4.tar.bz2
initscripts-48eb30850210f0aa500768ee11af63160dbbcff4.tar.xz
initscripts-48eb30850210f0aa500768ee11af63160dbbcff4.zip
fix shutdown with NFS root (#100556, <Julian.Blake@cern.ch>)
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt13
1 files changed, 8 insertions, 5 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 9063feda..fcb15aa3 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -25,7 +25,7 @@ runcmd() {
halt_get_remaining() {
awk '$2 ~ /^\/$|^\/proc|^\/dev/{next}
$3 == "tmpfs" || $3 == "proc" {print $2 ; next}
- /(^#|loopfs|autofs|devfs|^none|^\/dev\/root)/ {next}
+ /(^#|loopfs|autofs|devfs|^none|^\/dev\/ram|^\/dev\/root)/ {next}
{print $2}' /proc/mounts
}
@@ -172,12 +172,15 @@ done
# remove the crash indicator flag
rm -f /.autofsck
-# Try them all, one last time.
-umount -a -f
+# Try all file systems other than root and RAM disks, one last time.
+mount | awk '/!( \/ |^\/dev\/root|^\/dev\/ram)/ { print $3 }' | \
+ while read line; do
+ umount -f $line
+done
# Remount read only anything that's left mounted.
-#echo $"Remounting remaining filesystems (if any) readonly"
-mount | awk '/( \/ |^\/dev\/root)/ { print $3 }' | while read line; do
+# echo $"Remounting remaining filesystems readonly"
+mount | awk '{ print $3 }' | while read line; do
mount -n -o ro,remount $line
done