From 053cd72678b2d6fd9ea92906a945d1bf3bc06f9c Mon Sep 17 00:00:00 2001 From: Sukru Senli Date: Sun, 9 Oct 2016 17:28:39 +0200 Subject: [PATCH] adapt files to new router object style --- iup/files/sbin/iup | 6 ++++-- layer2interface/broadcom/etc/init.d/layer2_interface | 3 ++- questd/files/etc/init.d/quest | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/iup/files/sbin/iup b/iup/files/sbin/iup index 70eccea40..90f03ad82 100755 --- a/iup/files/sbin/iup +++ b/iup/files/sbin/iup @@ -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 diff --git a/layer2interface/broadcom/etc/init.d/layer2_interface b/layer2interface/broadcom/etc/init.d/layer2_interface index 1ff62270a..316766891 100755 --- a/layer2interface/broadcom/etc/init.d/layer2_interface +++ b/layer2interface/broadcom/etc/init.d/layer2_interface @@ -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 diff --git a/questd/files/etc/init.d/quest b/questd/files/etc/init.d/quest index d9eee38f9..7b1d45420 100755 --- a/questd/files/etc/init.d/quest +++ b/questd/files/etc/init.d/quest @@ -23,6 +23,6 @@ service_triggers() } reload_service() { - ubus call router reload + ubus -t 5 call router.network reload }