#!/bin/sh
# zswap:	Activate zswap
#
# chkconfig: - 08 92
# description:	Activate zswap

# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

start(){
	action "Enable zswap:" /usr/bin/zswap on
	RETVAL=$?
	return $RETVAL
}

stop(){
	action "Disable zswap:" /usr/bin/zswap off
	RETVAL=$?
	return $RETVAL
}

restart(){
	stop
	start
}

case "$1" in # See how we were called.
	start|stop|restart) $1;;
	reload) restart;;
	status) /usr/bin/zswap
			RETVAL=$?;;
	*)	msg_usage "${0##*/} {start|stop|reload|restart}"
		RETVAL=1
esac

exit $RETVAL
