rework upgrade system

This commit is contained in:
Alfonso Gamboa 2022-05-28 06:02:44 -07:00
parent 8bd4e16fed
commit 01f9a8ef8d
4 changed files with 7 additions and 8 deletions

View File

@ -165,11 +165,4 @@ elif [[ -d /opt/Upgrade ]]; then
touch /tmp/dbgflag touch /tmp/dbgflag
fi 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 /linuxrc

View File

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

View File

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

View File

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