diff options
author | Bill Nottingham <notting@redhat.com> | 1999-09-13 00:51:40 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-09-13 00:51:40 +0000 |
commit | 7d349f0491187533c82fcce5d4b1cd14b2441fdd (patch) | |
tree | 10c6ce86038b80667a59c5cd05775518b8de9bdc /rc.d/init.d/halt | |
parent | 8d5a09ff2c77318473115522dadfa913fd4826b6 (diff) | |
download | initscripts-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-x | rc.d/init.d/halt | 3 |
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 |