Developing lightweight computation at the DSG edge

Commit 4c984d89 authored by p4u's avatar p4u Committed by Simó Albert i Beltran
Browse files

Restart or reconfigure network after configure wifi, closes #220.

parent 78b0a4c9
...@@ -56,10 +56,10 @@ country = s_wireless_main:option(Value,"country", translate("Country")) ...@@ -56,10 +56,10 @@ country = s_wireless_main:option(Value,"country", translate("Country"))
bssid = s_wireless_main:option(Value,"bssid","BSSID") bssid = s_wireless_main:option(Value,"bssid","BSSID")
-- Button Rescan Wifi devices -- Button Rescan Wifi devices
confwifi = s_wireless_main:option(Button, "_confwifi", translate("Rescan and configure devices")) confwifi = s_wireless_main:option(Button, "_confwifi", translate("Reconfigure"),translate("Rescan and reconfigure all devices. This option requieres reboot. <br/>Use it just in case you have added or changed a device."))
function confwifi.write(self, section) function confwifi.write(self, section)
luci.sys.call("qmpcontrol configure_wifi > /tmp/qmp_rescan_wifi_devices.output") luci.sys.call("rm -f /qmp_configured; /etc/init.d/qmp_autoconf start")
end end
...@@ -111,7 +111,7 @@ end ...@@ -111,7 +111,7 @@ end
function m.on_commit(self,map) function m.on_commit(self,map)
http.redirect("/luci-static/resources/qmp/wait_short.html") http.redirect("/luci-static/resources/qmp/wait_short.html")
luci.sys.call('/etc/qmp/qmp_control.sh configure_wifi > /tmp/qmp_control_wifi.log &') luci.sys.call('(/etc/qmp/qmp_control.sh configure_wifi ; /etc/init.d/network reload)&')
end end
......
...@@ -205,8 +205,7 @@ end ...@@ -205,8 +205,7 @@ end
function apply(self) function apply(self)
http.redirect("/luci-static/resources/qmp/wait_long.html") http.redirect("/luci-static/resources/qmp/wait_long.html")
luci.sys.call('qmpcontrol configure_network >> /tmp/log/qmp_control_network.log &') luci.sys.call('(qmpcontrol configure_wifi ; qmpcontrol configure_network) &')
luci.sys.call('qmpcontrol configure_wifi >> /tmp/log/qmp_control_wifi.log &')
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment