diff options
author | Bill Nottingham <notting@redhat.com> | 2005-04-27 16:40:18 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-04-27 16:40:18 +0000 |
commit | f30714aabace8847a225899e9427cad86b7cb5c5 (patch) | |
tree | 8b6d82f2ff470e0edcade60d14855c7b095d2f7c /rc.d/init.d/halt | |
parent | 1635b8ae87831cc4cd836ed75bd35cbe7c05fd43 (diff) | |
download | initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar.gz initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar.bz2 initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.tar.xz initscripts-f30714aabace8847a225899e9427cad86b7cb5c5.zip |
I'm going to go out on a limb and say that /proc/mounts *doesn't* have
comments.
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-x | rc.d/init.d/halt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 80072b89..a979f644 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -127,8 +127,8 @@ runcmd $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS # Unmount file systems, killing processes if we have to. # Unmount loopback stuff first -remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` -devremaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` +remaining=`awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` +devremaining=`awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` [ -n "$remaining" ] && { sig= retry=3 @@ -143,8 +143,8 @@ devremaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/m losetup $dev > /dev/null 2>&1 && \ runcmd $"Detaching loopback device $dev: " losetup -d $dev done - remaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` - devremaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` + remaining=`awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts` + devremaining=`awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5 @@ -156,7 +156,7 @@ devremaining=`awk '!/^#/ && $1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/m # Unmount RPC pipe file systems sig= retry=3 -remaining=`awk '!/^#/ && $3 ~ /^rpc_pipefs$/ || $3 ~ /^rpc_svc_gss_pipefs$/ {print $2}' /proc/mounts` +remaining=`awk '$3 ~ /^rpc_pipefs$/ || $3 ~ /^rpc_svc_gss_pipefs$/ {print $2}' /proc/mounts` while [ -n "$remaining" -a "$retry" -gt 0 ] do @@ -166,7 +166,7 @@ do runcmd $"Unmounting pipe file systems: " umount -f $remaining fi sleep 2 - remaining=`awk '!/^#/ && $3 ~ /^rpc_pipefs$/ || $3 ~ /^rpc_svc_gss_pipefs$/ {print $2}' /proc/mounts` + remaining=`awk '$3 ~ /^rpc_pipefs$/ || $3 ~ /^rpc_svc_gss_pipefs$/ {print $2}' /proc/mounts` [ -z "$remaining" ] && break /sbin/fuser -k -m $sig $remaining >/dev/null sleep 5 |