diff options
author | Bill Nottingham <notting@redhat.com> | 2003-09-03 23:27:12 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2003-09-03 23:27:12 +0000 |
commit | 21df148508c36e212db01c2655ae854f9eb659e5 (patch) | |
tree | ef405ce6ab04566159648b3f272fbd7cd4a638f1 | |
parent | 5995871a035dc8e1d2129d48a1e2e390e6cf4533 (diff) | |
download | initscripts-21df148508c36e212db01c2655ae854f9eb659e5.tar initscripts-21df148508c36e212db01c2655ae854f9eb659e5.tar.gz initscripts-21df148508c36e212db01c2655ae854f9eb659e5.tar.bz2 initscripts-21df148508c36e212db01c2655ae854f9eb659e5.tar.xz initscripts-21df148508c36e212db01c2655ae854f9eb659e5.zip |
check for /proc/swaps before awking it (#99373, <daniel.blueman@gmx.net>)
-rwxr-xr-x | rc.d/init.d/halt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt index 9063feda..dfb9178d 100755 --- a/rc.d/init.d/halt +++ b/rc.d/init.d/halt @@ -115,7 +115,7 @@ esac runcmd $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS # Turn off swap, then unmount file systems. -SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps` +[ -f /proc/swaps ] && SWAPS=`awk '! /^Filename/ { print $1 }' /proc/swaps` [ -n "$SWAPS" ] && runcmd $"Turning off swap: " swapoff $SWAPS [ -x /sbin/quotaoff ] && runcmd $"Turning off quotas: " /sbin/quotaoff -aug |