]> git.pld-linux.org Git - packages/acpid.git/commitdiff
- local is_yes copy
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 29 Jan 2012 18:34:55 +0000 (18:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    acpid.upstart -> 1.3

acpid.upstart

index 5e249550f2f1ff372380c89db84c1efa04de1597..abd6ecc067d38adb4f68e3bd31d060831525c70d 100644 (file)
@@ -7,7 +7,24 @@ stop on pld.shutdown-started
 respawn
 
 script
-       . /etc/rc.d/init.d/functions
+       is_yes() {
+               # Test syntax
+               if [ $# = 0 ]; then
+                       return 2
+               fi
+
+               # Check value
+               case "$1" in
+               yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
+                       # true returns zero
+                       return 0
+                       ;;
+               *)
+                       # false returns one
+                       return 1
+                       ;;
+               esac
+       }
 
        if [ -f /etc/sysconfig/acpid ]; then
                . /etc/sysconfig/acpid
This page took 0.143727 seconds and 4 git commands to generate.