#!/bin/sh #--- import colors and init-funcs --- . /usr/lib/init/colors.sh . /usr/lib/init/init-funcs.sh #------------------------------------ SWAPON_OPTS="-a" SWAPOFF_OPTS="-a" start() { notify "Starting swap" /usr/bin/swapon $SWAPON_OPTS check $? "start swap" return $? } stop() { notify "Stopping swap" /usr/bin/swapoff $SWAPOFF_OPTS check $? "stop swap" return $? } case "$1" in start|stop|restart|reload|help) "$1" ;; *) help return 1 esac return $?