#!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 depend() { need bootmisc } set_vars() { SWAPD_PID=/var/run/swapd.pid } start() { set_vars ebegin "Starting swapd" #/usr/sbin/swapd --config /etc/swapd.conf /usr/sbin/swapd --memlimit ${memlimit} \ --pause ${pause} \ --maxswaps ${maxswaps} \ --timeout ${timeout} \ --swapdir ${swapdir} \ --pidfile ${pidfile} \ --mkswap ${mkswap} \ --minswapsize ${minswapsize} \ --maxswapsize ${maxswapsize} eend $? return $? } # Force kill stop() { set_vars ebegin "Stopping swapd" if [ -f ${SWAPD_PID} ]; then kill `cat ${SWAPD_PID}` && \ rm -f ${SWAPD_PID} fi eend $? return 0 }