From 1122e704d541e92073b2facea3b58352820ac654 Mon Sep 17 00:00:00 2001 From: Antonio Aloisio Date: Thu, 23 May 2019 12:09:10 +0300 Subject: [PATCH] fwupdate: FIX new firmwares with alphabetically bigger extendedno are not correcly detected --- .../src/router/rom/webs_scripts/merlin_webs_update.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/release/src/router/rom/webs_scripts/merlin_webs_update.sh b/release/src/router/rom/webs_scripts/merlin_webs_update.sh index 87461de2508..8011944010a 100755 --- a/release/src/router/rom/webs_scripts/merlin_webs_update.sh +++ b/release/src/router/rom/webs_scripts/merlin_webs_update.sh @@ -32,12 +32,6 @@ current_extendno=$(nvram get extendno) # current_firm_is_beta=0 #fi -# Overload extendno: alpha is 11-19, beta is 51-59, release is 100-109. -current_extendno=$(echo $current_extendno | sed s/-g.*//;) -current_extendno=$(echo $current_extendno | sed "s/^[0-9]$/10&/;") -current_extendno=$(echo $current_extendno | sed s/^alpha/1/;) -current_extendno=$(echo $current_extendno | sed s/^beta/5/;) - # get firmware information forsq=$(nvram get apps_sq) model=$(nvram get productid) @@ -113,7 +107,7 @@ else fi fi elif [ "$current_buildno" -eq "$buildno" ]; then - if [ "$current_extendno" -lt "$lextendno" ]; then + if [ "${current_extendno}" \< "${extendno}" ]; then echo "---- lextendno: $lextendno ----" >> /tmp/webs_upgrade.log nvram set webs_state_flag=1 # Do upgrade if [ "$IS_SUPPORT_NOTIFICATION_CENTER" != "" ]; then @@ -138,7 +132,7 @@ if [ "$firmver_beta" != "" ] && [ "$buildno_beta" != "" ] && [ "$lextendno_beta" if [ "$current_buildno" -lt "$buildno_beta" ]; then get_beta_release=1 elif [ "$current_buildno" -eq "$buildno_beta" ]; then - if [ "$current_extendno" -lt "$lextendno_beta" ]; then + if [ "$current_extendno" \< "$extendno_beta" ]; then get_beta_release=1 fi fi