packages: 915resolution/915resolution.init - some nonsense replaced with fu...

glen glen at pld-linux.org
Sun Jan 2 22:29:51 CET 2011


Author: glen                         Date: Sun Jan  2 21:29:51 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- some nonsense replaced with functional code

---- Files affected:
packages/915resolution:
   915resolution.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/915resolution/915resolution.init
diff -u packages/915resolution/915resolution.init:1.1 packages/915resolution/915resolution.init:1.2
--- packages/915resolution/915resolution.init:1.1	Tue Jun 27 02:03:49 2006
+++ packages/915resolution/915resolution.init	Sun Jan  2 22:29:46 2011
@@ -17,12 +17,7 @@
 # See how we were called.
 case "$1" in
   start|restart|reload|force-reload)
-	grep -v "^#" /etc/sysconfig/915resolution | while read line
-	do
-		#TODO: make here some better better args checking
-		mode=`echo ${line} | awk '{ print $1;}'`
-		width=`echo ${line} | awk '{ print $2;}'`
-		height=`echo ${line} | awk '{ print $3;}'`
+	grep -vqE "^(#|[[:blank:]]*$)" /etc/sysconfig/915resolution | while read mode width height; do
 		run_cmd "Replacing Mode ${mode} of your card with ${width}x${height}" "915resolution ${mode} ${width} ${height}"
 	done
 	;;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/915resolution/915resolution.init?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list