15 |
|
|
16 |
case "$1" in |
case "$1" in |
17 |
start) |
start) |
18 |
echo -e ${COLOREDSTAR}"Activating all swap files/partitions ..." |
rc_print "Activating all swap files/partitions ..." |
19 |
swapon -a |
swapon -a |
20 |
evaluate_retval |
evaluate_retval |
21 |
|
|
24 |
;; |
;; |
25 |
|
|
26 |
stop) |
stop) |
27 |
echo -e ${COLOREDSTAR}"Deactivating all swap files/partitions ..." |
rc_print "Deactivating all swap files/partitions ..." |
28 |
swapoff -a |
swapoff -a |
29 |
evaluate_retval |
evaluate_retval |
30 |
|
|
39 |
;; |
;; |
40 |
|
|
41 |
status) |
status) |
42 |
echo "Retrieving swap status ..." |
rc_echo "Retrieving swap status ..." |
43 |
echo |
rc_echo |
44 |
swapon -s |
swapon -s |
45 |
;; |
;; |
46 |
|
|
47 |
*) |
*) |
48 |
echo "Usage: $0 {start|stop|restart|status}" |
rc_echo "Usage: $0 {start|stop|restart|status}" |
49 |
exit 1 |
exit 1 |
50 |
;; |
;; |
51 |
esac |
esac |