[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, shengine, updated. 1.1.0-beta.1-25-g5fcc619

Darren Salt linux at youmustbejoking.demon.co.uk
Fri Jun 19 15:00:22 UTC 2009


The following commit has been merged in the shengine branch:
commit 5fcc6193bd3e364392593dd92a19b9c62aaaae9f
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date:   Fri Jun 19 15:54:49 2009 +0100

    Fix toggling S.H.E. via hotkey.
    
    This puts handle_shengine where it belongs, in shengine.sh.
    That file is sourced from ac_adapter.sh, but a wrapper is needed in hotkey.sh.

diff --git a/etc/acpi/actions/ac_adapter.sh b/etc/acpi/actions/ac_adapter.sh
index d40bcdd..fc6102d 100755
--- a/etc/acpi/actions/ac_adapter.sh
+++ b/etc/acpi/actions/ac_adapter.sh
@@ -18,27 +18,6 @@ if [ -e "$DEFAULT" ]; then . "$DEFAULT"; fi
 . /etc/acpi/lib/notify.sh
 code="$3 $4"
 
-handle_shengine() {
-    . /etc/acpi/lib/shengine.sh
-    if [ -e "$SHENGINE_CTL" ]; then
-	if [ "$1" = '' ]; then
-	    cycle_shengine
-	else
-	    set_shengine "$1"
-	fi
-	if [ "$2" != '' ]; then return; fi
-	case $(get_shengine) in
-	    0) notify super_hybrid_engine 'S. H. Engine: Performance'; ;;
-	    1) notify super_hybrid_engine 'S. H. Engine: Standard'; ;;
-	    2) notify super_hybrid_engine 'S. H. Engine: Power-saving'; ;;
-	    255) notify super_hybrid_engine 'S. H. Engine: Automatic'; ;;
-	    *) notify error 'S. H. Engine unavailable'
-	esac
-    else
-	notify error 'S. H. Engine unavailable'
-    fi
-}
-
 case "$code" in
     # AC adapter present
     0000008[01]\ 00000001)
diff --git a/etc/acpi/actions/hotkey.sh b/etc/acpi/actions/hotkey.sh
index a3bb8c8..1de5077 100755
--- a/etc/acpi/actions/hotkey.sh
+++ b/etc/acpi/actions/hotkey.sh
@@ -93,6 +93,11 @@ show_brightness() {
     notify brightness "Brightness $percent%" fast
 }
 
+handle_shengine() {
+    . /etc/acpi/lib/shengine.sh
+    handle_shengine "$@"
+}
+
 case $code in
     # Fn + key:
     # <700/900-series key>/<1000-series key> - function
diff --git a/etc/acpi/lib/shengine.sh b/etc/acpi/lib/shengine.sh
index 3ef28ff..d93eeab 100644
--- a/etc/acpi/lib/shengine.sh
+++ b/etc/acpi/lib/shengine.sh
@@ -52,3 +52,23 @@ cycle_shengine()
 	echo "${SHENGINE_CLOCKING:-0}" > "$SHENGINE_CTL"
     fi
 }
+
+handle_shengine() {
+    if [ -e "$SHENGINE_CTL" ]; then
+	if [ "$1" = '' ]; then
+	    cycle_shengine
+	else
+	    set_shengine "$1"
+	fi
+	if [ "$2" != '' ]; then return; fi
+	case $(get_shengine) in
+	    0) notify super_hybrid_engine 'S. H. Engine: Performance'; ;;
+	    1) notify super_hybrid_engine 'S. H. Engine: Standard'; ;;
+	    2) notify super_hybrid_engine 'S. H. Engine: Power-saving'; ;;
+	    255) notify super_hybrid_engine 'S. H. Engine: Automatic'; ;;
+	    *) notify error 'S. H. Engine unavailable'
+	esac
+    else
+	notify error 'S. H. Engine unavailable'
+    fi
+}

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list