[Debian-eeepc-devel] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. df785afdacedf869b20fb88a793c13b539819270

Damyan Ivanov dmn at debian.org
Sun Sep 21 10:05:48 UTC 2008


The following commit has been merged in the master branch:
commit 8588f4f6edf5feea859f1d29a0561a5304cde494
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sun Sep 21 12:47:09 2008 +0300

    move screen locking from suspend.sh to a function in functions.sh

diff --git a/actions/suspend.sh b/actions/suspend.sh
index ec715b1..ac680ea 100755
--- a/actions/suspend.sh
+++ b/actions/suspend.sh
@@ -12,17 +12,7 @@ fi
 . /usr/share/eeepc-acpi-scripts/functions.sh
 
 if [ "$LOCK_SCREEN_ON_SUSPEND" = "yes" ]; then
-    # activate screensaver if available
-    if [ -S /tmp/.X11-unix/X0 ]; then
-        detect_x_display
-        if [ -f $XAUTHORITY ]; then
-            for ss in xscreensaver gnome-screensaver; do
-                [ -x /usr/bin/$ss-command ] \
-                    && pidof /usr/bin/$ss > /dev/null \
-                    && $ss-command --lock
-            done
-        fi
-    fi
+    lock_x_screen
 fi
 
 brn_control=/sys/class/backlight/eeepc/brightness
diff --git a/functions.sh b/functions.sh
index cb59333..8406de8 100644
--- a/functions.sh
+++ b/functions.sh
@@ -35,3 +35,18 @@ detect_x_display()
         home=$_home
     fi
 }
+
+lock_x_screen()
+{
+    # activate screensaver if available
+    if [ -S /tmp/.X11-unix/X0 ]; then
+        detect_x_display
+        if [ -f $XAUTHORITY ]; then
+            for ss in xscreensaver gnome-screensaver; do
+                [ -x /usr/bin/$ss-command ] \
+                    && pidof /usr/bin/$ss > /dev/null \
+                    && $ss-command --lock
+            done
+        fi
+    fi
+}

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-devel mailing list