Merge branch 'master' of github:OpenIPC/firmware

pull/315/head
Igor Zalatov (from Citadel PC) 2022-08-04 14:39:54 +03:00
commit a5a39aa1b3
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
# OpenIPC.org | v.20220803 # OpenIPC.org | v.20220803
# #
scr_version=1.0.2 scr_version=1.0.3
args=" $@" args=" $@"
@ -119,10 +119,10 @@ self_update() {
if [ -f /tmp/sysupgrade ] && grep -q "#!/bin/sh" /tmp/sysupgrade; then if [ -f /tmp/sysupgrade ] && grep -q "#!/bin/sh" /tmp/sysupgrade; then
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='` dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
if ! [ "${scr_version}" = "${dstv}" ]; then if ! [ "${scr_version}" = "${dstv}" ]; then
echo "A new version is available, trying to run updated script..." echo "A new version is available, trying to activate updated script..."
chmod +x /tmp/sysupgrade chmod +x /tmp/sysupgrade
exec /tmp/sysupgrade ${args}
echo -e "Done. Restarting...\n" echo -e "Done. Restarting...\n"
exec /tmp/sysupgrade ${args}
exit 1 exit 1
else else
echo "Ok, version match." echo "Ok, version match."