adapt files to new router object style

This commit is contained in:
Sukru Senli 2016-10-09 17:28:39 +02:00
parent cf69e4b75e
commit 053cd72678
3 changed files with 7 additions and 4 deletions

View file

@ -350,8 +350,9 @@ handle_option224()
if [ $url ] && [ $active -eq 1 ]; then
echo "Software version to download $softwareminuspath"
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
local sysinfo=$(ubus call router.system info)
json_load "$sysinfo"
json_select system
json_get_var firmware firmware
local firmware_new=${softwareminuspath%.*} # remove extension (.w, .y or .y2) from filename
if [ "$firmware_new" != "$firmware" ] ; then
@ -455,8 +456,9 @@ sofwareminuspath=${software##*/}
v "Software version to download $sofwareminuspath"
if [ $software ]; then
local sysinfo=$(ubus call router quest "{ \"info\": \"system\" }")
local sysinfo=$(ubus call router.system info)
json_load "$sysinfo"
json_select system
json_get_var firmware firmware
json_get_var filesystem filesystem
if [ "$filesystem" == "JFFS2" ] ; then

View file

@ -78,7 +78,8 @@ start_service() {
xtmctl start
xtmctl operate intf --state 1 enable
json_load "$(ubus call router quest "{ \"info\": \"specs\" }")"
json_load "$(ubus call router.system info)"
json_select specs
json_get_var vdsl vdsl
if [ $vdsl -eq 1 ]; then

View file

@ -23,6 +23,6 @@ service_triggers()
}
reload_service() {
ubus call router reload
ubus -t 5 call router.network reload
}