aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt2
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