aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/halt
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-09-13 00:51:40 +0000
committerBill Nottingham <notting@redhat.com>1999-09-13 00:51:40 +0000
commit7d349f0491187533c82fcce5d4b1cd14b2441fdd (patch)
tree10c6ce86038b80667a59c5cd05775518b8de9bdc /rc.d/init.d/halt
parent8d5a09ff2c77318473115522dadfa913fd4826b6 (diff)
downloadinitscripts-7d349f0491187533c82fcce5d4b1cd14b2441fdd.tar
initscripts-7d349f0491187533c82fcce5d4b1cd14b2441fdd.tar.gz
initscripts-7d349f0491187533c82fcce5d4b1cd14b2441fdd.tar.bz2
initscripts-7d349f0491187533c82fcce5d4b1cd14b2441fdd.tar.xz
initscripts-7d349f0491187533c82fcce5d4b1cd14b2441fdd.zip
fix swapoff so it's not called with no args
Diffstat (limited to 'rc.d/init.d/halt')
-rwxr-xr-xrc.d/init.d/halt3
1 files changed, 2 insertions, 1 deletions
diff --git a/rc.d/init.d/halt b/rc.d/init.d/halt
index 5c50bf66..9a368cbf 100755
--- a/rc.d/init.d/halt
+++ b/rc.d/init.d/halt
@@ -53,7 +53,8 @@ halt -w
# 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
-swapoff `cut -f1 -d " " /proc/swaps | tail +2`
+OTHERSWAP=`cut -f1 -d " " /proc/swaps | tail +2`
+[ -n "$OTHERSWAP" ] && swapoff $OTHERSWAP
[ -x /sbin/accton ] && /sbin/accton
runcmd "Unmounting file systems" umount -a -f