2 TUXONICE_RCSID='$Revision$ $Date:: $'
4 # geninitrd mod: tuxonice
5 USE_TUXONICE=${USE_TUXONICE:-no}
8 # setup geninitrd module
10 setup_mod_tuxonice() {
11 # backwards compatible
13 if [ "$USE_SUSPEND2" ]; then
14 USE_TUXONICE=$USE_SUSPEND2
15 warn "USE_SUSPEND2 is deprecated, use USE_TUXONICE now instead."
19 # generate initrd fragment
21 initrd_gen_tuxonice() {
22 if ! is_yes "$USE_TUXONICE"; then
28 for arg in $CMDLINE; do
29 if [ "${arg##resume=}" != "${arg}" -o "${arg##resume2=}" != "${arg}" ]; then
33 if [ "$resume" = "yes" ]; then
34 [ -e /proc/suspend2/do_resume ] && echo 1 > /proc/suspend2/do_resume
35 [ -e /sys/power/suspend2/do_resume ] && echo 1 > /sys/power/suspend2/do_resume
36 [ -e /sys/power/tuxonice/do_resume ] && echo 1 > /sys/power/tuxonice/do_resume