aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d')
-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 7377385e..a08b9283 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -59,7 +59,7 @@ fi
# Turn off swap, then unmount file systems.
runcmd "Turning off swap and accounting" swapoff -a
# Turn off other swap that isn't in /etc/fstab
-OTHERSWAP=`cut -f1 -d " " /proc/swaps | tail +2`
+OTHERSWAP=`awk '! /^Filename/ { print $1 }' /proc/swaps`
[ -n "$OTHERSWAP" ] && swapoff $OTHERSWAP
[ -x /sbin/accton ] && /sbin/accton