From 82d4fef6a6137af8a1202c8fb697e0ae9e777ee4 Mon Sep 17 00:00:00 2001 From: Alex Oprea Date: Thu, 12 May 2016 18:19:33 +0200 Subject: [PATCH] iup: option 224 fix ciclying reboot refs #9077 --- iup/files/sbin/iup224 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/iup/files/sbin/iup224 b/iup/files/sbin/iup224 index 330427cc3..e252976e7 100755 --- a/iup/files/sbin/iup224 +++ b/iup/files/sbin/iup224 @@ -58,15 +58,8 @@ if [ $url ] && [ $active -eq 1 ]; then local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }") json_load "$sysinfo" json_get_var firmware firmware - json_get_var filesystem filesystem - if [ "$filesystem" == "JFFS2" ] ; then - firmware1=$firmware.w - firmware2=$firmware.w - else - firmware1=$firmware.y - firmware2=$firmware.y2 - fi - if [ "$softwareminuspath" == "${softwareminuspath/$firmware1/}" -o "$softwareminuspath" == "${softwareminuspath/$firmware2/}" ] ; then + local firmware_new=${softwareminuspath%.*} # remove extension (.w, .y or .y2) from filename + if [ "$firmware_new" != "$firmware" ] ; then echo "Image found $url will start flashing" wait_for_dns $url /sbin/sysupgrade -v $url &