#!/bin/bash # For kernels <=2.2.15, you may need to kill threaded processes; this can be # done by uncommenting the following variables and editing the list as # necessary # # SWSUSP_PROGS="gv gs xmms gnomexmms pybliographer soffice soffice.bin galeon-bin wombat" # SWSUSP_SERVICES="identd" SWSUSP_PROGS="" SWSUSP_SERVICES="" SWSUSP_MODULES_REMOVE="eepro100" SWSUSP_MODULES_INSERT="eepro100" case "$1" in suspend) for n in $SWSUSP_PROGS; do logger "apmcontinue: killing $n" killall -q $n done for n in $SWSUSP_SERVICES; do logger "apmcontinue: stoping service $n" /etc/rc.d/init.d/$n stop done for n in $SWSUSP_MODULES_REMOVE; do logger "apmcontinue: removing module $n" /sbin/rmmod $n done sleep 1 ;; resume) for n in $SWSUSP_MODULES_INSERT; do logger "apmcontinue: inserting module $n" /sbin/insmod $n done for n in $SWSUSP_SERVICES; do logger "apmcontinue: starting service $n" /etc/rc.d/init.d/$n start done logger "apmcontinue: resetting system clock from hardware clock" /sbin/hwclock --hctosys if [ -f /var/lock/subsys/resume ]; then logger "apmcontinue: removing /var/lock/subsys/resume" rm -f /var/lock/subsys/resume fi ;; *) logger "FAIL: Wrong parameter \"$PROG\" in apmcontinue!" exit 1 ;; esac exit 0