Removing old changelog entries, make files ready for lfs-4.0 release
[linux_from_scratch.git] / bootscripts / rc.d / init.d / swap
blob651a75e07a9d7773ee11c42b3b5c1cf37651c49c
1 #!/bin/bash
2 # Begin $rc_base/init.d/swap - Swap Control Script
4 # Written by Gerard Beekmans - gerard@linuxfromscratch.org
6 source /etc/sysconfig/rc
7 source $rc_functions
9 case "$1" in
10 start)
11 echo "Activating all swap files/partitions..."
12 swapon -a
13 evaluate_retval
16 stop)
17 echo "Deactivating all swap files/partitions..."
18 swapoff -a
19 evaluate_retval
22 restart)
23 $0 stop
24 sleep 1
25 $0 start
28 status)
29 echo "Retrieving swap status..."
30 echo
31 swapon -s
35 echo "Usage: $0 {start|stop|restart|status}"
36 exit 1
38 esac
40 # End $rc_base/init.d/swap