#!/bin/bash # $Id$ #%rlevels: 7:s 0:k 6:k #%start: 10 #%stop: 70 #deps #%needs: #%before: #%after: source /etc/conf.d/rc source ${rc_functions} case "$1" in start) rc_print "Activating all swap files/partitions ..." swapon -a evaluate_retval update_svcstatus $1 splash svc_started "$(basename $0)" 0 ;; stop) rc_print "Deactivating all swap files/partitions ..." swapoff -a evaluate_retval update_svcstatus $1 splash svc_stopped "$(basename $0)" 0 ;; restart) $0 stop sleep 1 $0 start ;; status) rc_echo "Retrieving swap status ..." rc_echo swapon -s ;; *) rc_echo "Usage: $0 {start|stop|restart|status}" exit 1 ;; esac