[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 831260439e8e873d7ae502d9c150c2091fd17b79
Damyan Ivanov
dmn at debian.org
Mon Feb 2 14:39:42 UTC 2009
The following commit has been merged in the master branch:
commit 6d5f53fc569623c4618a23a4f6c6484584256e5f
Author: Raphael Geissert <atomo64 at gmail.com>
Date: Thu Jan 29 17:10:22 2009 -0600
Add support for different suspend methods, but keep pm-suspend as the default
Signed-off-by: Raphael Geissert <atomo64 at gmail.com>
diff --git a/debian/eeepc-acpi-scripts.default b/debian/eeepc-acpi-scripts.default
index 17e1906..fd6b26c 100644
--- a/debian/eeepc-acpi-scripts.default
+++ b/debian/eeepc-acpi-scripts.default
@@ -19,7 +19,21 @@ HEADPHONE_LABEL='iSpeaker'
VGA_ON='--auto'
LVDS_OFF='--off'
-# attempt to lock running xscreensaver or gnome-screensaver on suspend
+# Use the specified suspend method, where the method is actually the name
+# of a command.
+# Common methods:
+# pm-suspend (default), pm-hibernate, pm-suspend-hybrid
+# hibernate-ram, hibernate-disk
+#
+# s2ram and friends can also be specified but it is usually better to run them
+# via a wrapper.
+# SUSPEND_OPTIONS is passed as-is to the command.
+SUSPEND_METHOD=pm-suspend
+SUSPEND_OPTIONS=--quirck-s3-bios
+
+# attempt to lock running xscreensaver or gnome-screensaver on suspend.
+# if you use hibernate(1) make sure you only indicate in one place to lock the
+# screen.
LOCK_SCREEN_ON_SUSPEND='yes'
# try to load/unload the hci_usb module and use hcitool for checking
diff --git a/etc/acpi/actions/suspend.sh b/etc/acpi/actions/suspend.sh
index fa5953b..06004cd 100755
--- a/etc/acpi/actions/suspend.sh
+++ b/etc/acpi/actions/suspend.sh
@@ -19,5 +19,15 @@ brn_control=/sys/class/backlight/eeepc/brightness
[ -e $brn_control ] || brn_control=/proc/acpi/asus/brn # pre-2.6.26
brightness=$(cat $brn_control)
-pm-suspend --quirk-s3-bios
+
+# Setting defaults in case /etc/default/eeepc-acpi-scripts was not updated
+if [ -z "$SUSPEND_METHOD" ]; then
+ SUSPEND_OPTIONS=--quirk-s3-bios
+fi
+if [ -z "$(which "$SUSPEND_METHOD")" ]; then
+ SUSPEND_METHOD=pm-suspend
+fi
+
+$SUSPEND_METHOD $SUSPEND_OPTIONS
+
echo $brightness > $brn_control
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list