packages: acpid/acpid.upstart - local is_yes copy

glen glen at pld-linux.org
Sun Jan 29 19:35:00 CET 2012


Author: glen                         Date: Sun Jan 29 18:35:00 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- local is_yes copy

---- Files affected:
packages/acpid:
   acpid.upstart (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/acpid/acpid.upstart
diff -u packages/acpid/acpid.upstart:1.2 packages/acpid/acpid.upstart:1.3
--- packages/acpid/acpid.upstart:1.2	Sat Jul 30 15:36:21 2011
+++ packages/acpid/acpid.upstart	Sun Jan 29 19:34:55 2012
@@ -7,7 +7,24 @@
 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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/acpid/acpid.upstart?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list