#!/sbin/runscript start() { ebegin "Enable compcache" local TIMEOUT modprobe compcache ${COMPCACHE_PARAM} && \ TIMEOUT=0 && while TIMEOUT=$(( ${TIMEOUT} + 1 )) do test -e /dev/ramzswap0 && break [ ${TIMEOUT} -lt 10 ] || break sleep 1 done && \ 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 }