[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.0-beta.1-10-g3a685c7

Raphael Geissert atomo64 at gmail.com
Mon May 25 02:07:39 UTC 2009


The following commit has been merged in the master branch:
commit 3a685c737cae5e94d6553d9d12788b1c6583d306
Author: Raphael Geissert <atomo64 at gmail.com>
Date:   Sun May 24 21:06:23 2009 -0500

    Allow fine-grained control over the lid-closing action.
    
    Introduce LID_CLOSE_ACTION to allow users to control whether the laptop
    should be suspended, a specified command executed, or nothing be done
    when the lid is closed.

diff --git a/debian/changelog b/debian/changelog
index 51b0246..0d86998 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ eeepc-acpi-scripts (1.1.1) unstable; urgency=low
   * Alter the audio control blacklisting to allow for controls for which
     (for example) muting only should be allowed.
   * Add "Beep" to the audio control blacklist, but only for volume control.
+  * Allow fine-grained control over the lid-closing action.
 
  -- Darren Salt <linux at youmustbejoking.demon.co.uk>  Sat, 25 Apr 2009 16:47:17 +0100
 
diff --git a/debian/eeepc-acpi-scripts.default b/debian/eeepc-acpi-scripts.default
index 5cacdf0..b8658d5 100644
--- a/debian/eeepc-acpi-scripts.default
+++ b/debian/eeepc-acpi-scripts.default
@@ -62,6 +62,14 @@ SUSPEND_OPTIONS=--quirk-s3-bios
 # screen.
 LOCK_SCREEN_ON_SUSPEND='yes'
 
+# Action to perform when the lid is closed.
+# If left empty, or by specifying "suspend", it will suspend via the
+# SUSPEND_METHOD, as specified above.
+# To do nothing, set it to "nothing".
+#
+# Setting it to anything else will result in it being treated as a command.
+LID_CLOSE_ACTION=
+
 # try to load/unload the hci_usb module and use hcitool for checking
 # bluetooth state when the bluetooth control node in
 # /sys/devices/platform/bluetooth is not present
diff --git a/etc/acpi/actions/lid.sh b/etc/acpi/actions/lid.sh
index 7b4656e..d7ccff7 100755
--- a/etc/acpi/actions/lid.sh
+++ b/etc/acpi/actions/lid.sh
@@ -4,6 +4,7 @@
 
 . /usr/share/acpi-support/policy-funcs
 
+
 # If powersaved is running, let it process the acpi event
 if pidof powersaved; then
 	exit 0
@@ -13,6 +14,18 @@ if [ `CheckPolicy` = 0 ] ; then
 	exit 0
 fi
 
-[ -e /etc/acpi/actions/suspend.sh ] || exit 0
+[ -e /etc/default/eeepc-acpi-scripts ] || exit 0
+. /etc/default/eeepc-acpi-scripts
 
-. /etc/acpi/actions/suspend.sh
+case "$LID_CLOSE_ACTION" in
+    nothing)
+	exit 0
+    ;;
+    suspend|"")
+	[ -e /etc/acpi/actions/suspend.sh ] || exit 0
+	. /etc/acpi/actions/suspend.sh
+    ;;
+    *)
+	$LID_CLOSE_ACTION
+    ;;
+esac

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list