#!/sbin/runscript # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ start() { ebegin "Enable compcache" modprobe compcache ${COMPCACHE_PARAM} sleep 1 swapon -p ${COMPCACHE_PRIORITY} /dev/ramzswap0 eend $? } stop() { ebegin "Disable compache" if grep /dev/ramzswap0 /proc/swaps > /dev/null; then swapoff /dev/ramzswap0 rmmod compcache eend $? else einfo "Compache is already disabled" eend 0 fi }