|
|
@@ -34,7 +34,7 @@ GPIO=63
|
|
|
mount --bind /opt/wz_mini/bin/busybox /bin/busybox
|
|
|
|
|
|
#test for v2
|
|
|
-if [ -b /dev/mtdblock7 ]; then
|
|
|
+if [ -b /dev/mtdblock9 ]; then
|
|
|
mount -t jffs2 /dev/mtdblock9 /params
|
|
|
if cat /params/config/.product_config | grep WYZEC1-JZ; then
|
|
|
V2="true"
|
|
|
@@ -152,21 +152,23 @@ if [[ "$DEBUG_ENABLED" == "true" ]]; then
|
|
|
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
|
|
sed -i '/^# Run init/i/bin/sh /etc/profile' /opt/wz_mini/tmp/.storage/rcS
|
|
|
touch /tmp/dbgflag
|
|
|
-else
|
|
|
|
|
|
-if [[ "$WEB_CAM_ENABLE" == "true" ]]; then
|
|
|
+elif [[ "$WEB_CAM_ENABLE" == "true" ]]; then
|
|
|
sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
|
|
sed -i '/^# Run init/i/opt/wz_mini/etc/init.d/wz_cam.sh' /opt/wz_mini/tmp/.storage/rcS
|
|
|
touch /tmp/dbgflag
|
|
|
-fi
|
|
|
|
|
|
+elif [[ -d /opt/Upgrade ]]; then
|
|
|
+ sed -i '/app_init.sh/,+4d' /opt/wz_mini/tmp/.storage/rcS
|
|
|
+ sed -i '/^# Run init/i/bin/sh /etc/profile' /opt/wz_mini/tmp/.storage/rcS
|
|
|
+ sed -i '/^# Mount configs.*/i/opt/wz_mini/usr/bin/upgrade-run.sh\n' /opt/wz_mini/tmp/.storage/rcS
|
|
|
+ touch /tmp/dbgflag
|
|
|
fi
|
|
|
|
|
|
if ! [[ -e /tmp/dbgflag ]]; then
|
|
|
-# /opt/wz_mini/run_mmc.sh &
|
|
|
/opt/wz_mini/etc/init.d/wz_user.sh &
|
|
|
else
|
|
|
- echo "debug enabled, ignore run_mmc.sh"
|
|
|
+ echo "debug enabled, ignore wz_user.sh"
|
|
|
fi
|
|
|
|
|
|
|