]> git.pld-linux.org Git - packages/915resolution.git/commitdiff
- some nonsense replaced with functional code
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 2 Jan 2011 21:29:46 +0000 (21:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    915resolution.init -> 1.2

915resolution.init

index 795294897e80db54d77409f54f2a86ec35e3e969..041a58f65df70b741d93818d32b9f58ce1d6b82e 100644 (file)
@@ -17,12 +17,7 @@ fi
 # 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
        ;;
This page took 0.087256 seconds and 4 git commands to generate.