iup: option 224 follows standard

This commit is contained in:
Sukru Senli 2016-04-29 10:46:41 +02:00
parent 51d12dfa94
commit c051d61f49

View file

@ -32,7 +32,7 @@ elif [ $a ] && [ $b ] && [ $a -lt 25 ] ; then
now=$(date +%s)
end=$((begin+3600*$b))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
active=1
fi
elif [ $a ] && [ $b ] && [ $c ] && [ $a -gt 25 ] ; then
#Date
@ -43,7 +43,7 @@ elif [ $a ] && [ $b ] && [ $c ] && [ $a -gt 25 ] ; then
now=$(date +%s)
end=$((begin+3600*$c))
if [ $now -gt $begin ] && [ $now -lt $end ] ; then
active=1
active=1
fi
else
echo "Bad format"
@ -53,23 +53,25 @@ fi
sofwareminuspath=${url##*/}
if [ $url ] && [ $active -eq 1 ]; then
echo "Software version to download $sofwareminuspath"
echo "Software version to download $sofwareminuspath"
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
firmware=$firmware.w
else
firmware=$firmware.y
fi
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" ] ; then
if [ "$filesystem" == "JFFS2" ] ; then
firmware=$firmware.w
firmware2=$firmware.w
else
firmware=$firmware.y
firmware2=$firmware.y2
fi
if [ "$sofwareminuspath" == "${sofwareminuspath/$firmware/}" -o "$sofwareminuspath" == "${sofwareminuspath/$firmware2/}" ] ; then
echo "Image found $url will start flashing"
/sbin/sysupgrade -v $url
/sbin/sysupgrade -v $url &
exit 1
else
echo "Will not update software, already up to date"
exit 0
fi
fi