Skip to content

Commit

Permalink
fwupdate: FIX new firmwares with alphabetically bigger extendedno are…
Browse files Browse the repository at this point in the history
… not correcly detected
  • Loading branch information
Antonio Aloisio committed May 26, 2019
1 parent 5634a86 commit 1122e70
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions release/src/router/rom/webs_scripts/merlin_webs_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1122e70

Please sign in to comment.