Explorar o código

rework upgrade system

Alfonso Gamboa %!s(int64=3) %!d(string=hai) anos
pai
achega
01f9a8ef8d

+ 0 - 7
SD_ROOT/wz_mini/etc/init.d/v3_init.sh

@@ -165,11 +165,4 @@ elif [[ -d /opt/Upgrade ]]; then
 	touch /tmp/dbgflag
 fi
 
-if ! [[ -e /tmp/dbgflag ]]; then
-		/opt/wz_mini/etc/init.d/wz_user.sh &
-else
-	echo "debug enabled, ignore wz_user.sh"
-fi
-
-
 /linuxrc

+ 1 - 0
SD_ROOT/wz_mini/etc/init.d/v3_post.sh

@@ -60,6 +60,7 @@ if [[ "$RTSP_HI_RES_ENABLED" == "true" ]] ||  [[ "$RTSP_LOW_RES_ENABLED" == "tru
 
         cp /system/bin/iCamera /opt/wz_mini/tmp/.storage/
         mount -o ro,bind /opt/wz_mini/usr/bin/iCamera /system/bin/iCamera
+	/opt/wz_mini/etc/init.d/wz_user.sh &
 fi
 
 ##LIBRARY DEBUG

+ 6 - 0
SD_ROOT/wz_mini/etc/init.d/wz_user.sh

@@ -7,6 +7,12 @@ set -x
 echo "welcome to wz_user.sh"
 echo "PID $$"
 
+
+if [[ -e /tmp/dbgflag ]];then
+        echo "debug mode, disabled"
+        exit 0
+fi
+
 export WZMINI_CFG=/opt/wz_mini/wz_mini.conf
 
 [ -f $WZMINI_CFG ] && source $WZMINI_CFG

+ 0 - 1
SD_ROOT/wz_mini/usr/bin/upgrade-run.sh

@@ -33,7 +33,6 @@ reboot
 if [[ -e /tmp/dbgflag ]]; then
 upgrade_mode_start
 else
-
 read -r -p "${1:-wz_mini, this will download the latest version and upgrade your system.  Are you sure? [y/N]} " response
     case "$response" in
         [yY][eE][sS]|[yY])