OSDN Git Service

init.sh: only do set_property on the init stage
authorChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 9 May 2016 15:55:25 +0000 (23:55 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 19 May 2016 13:31:00 +0000 (21:31 +0800)
init.sh

diff --git a/init.sh b/init.sh
index 3e02a24..7ed51de 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -402,18 +402,20 @@ PRODUCT=$(cat $DMIPATH/product_name)
 # import cmdline variables
 for c in `cat /proc/cmdline`; do
        case $c in
-               androidboot.hardware=*)
+               *.*=*)
                        ;;
                *=*)
                        eval $c
-                       case $c in
-                               HWACCEL=*)
-                                       set_property debug.egl.hw $HWACCEL
-                                       ;;
-                               DEBUG=*)
-                                       set_property debug.logcat 1
-                                       ;;
-                       esac
+                       if [ -z "$1" ]; then
+                               case $c in
+                                       HWACCEL=*)
+                                               set_property debug.egl.hw $HWACCEL
+                                               ;;
+                                       DEBUG=*)
+                                               [ -n "$DEBUG" ] && set_property debug.logcat 1
+                                               ;;
+                               esac
+                       fi
                        ;;
        esac
 done