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

Damyan Ivanov dmn at debian.org
Sat Mar 8 21:03:37 UTC 2008


The following commit has been merged in the master branch:
commit fd70582e6e80ec41dd9800313bb79349da6f5eba
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sat Mar 8 23:00:58 2008 +0200

    suspend.sh: fix detection of running shutdown
    
    instead of grepping the output of 'ps x' for '/sbin/shutdown',
    use 'pidof /sbin/shutdown'.
    
    The problem with grepping the output of 'ps x' is that the grep
    itself may match, causing the system to not be suspended

diff --git a/actions/suspend.sh b/actions/suspend.sh
index 9a31c0a..393fd94 100755
--- a/actions/suspend.sh
+++ b/actions/suspend.sh
@@ -3,7 +3,7 @@
 # do nothing if package is removed
 [ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0
 
-if (runlevel | grep -q [06]) || (ps x | grep -q '/sbin/shutdown'); then
+if (runlevel | grep -q [06]) || (pidof '/sbin/shutdown' > /dev/null); then
     exit 0
 fi
 

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-devel mailing list