summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-02-21 12:46:03 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-02-21 12:46:03 +0000
commit02a67572f8cbbcbbea7be0b5d4f8125415d896bc (patch)
tree8cd5b13f80451276e899bc7a9aa69c36bd6377f2 /modules/admin-full/luasrc
parent74c6fb4cd795e7486ed0cb7a3cc04fd26bead536 (diff)
modules/admin-full: restart radvd if needed
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r--modules/admin-full/luasrc/controller/admin/network.lua6
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua5
2 files changed, 11 insertions, 0 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/network.lua b/modules/admin-full/luasrc/controller/admin/network.lua
index 73efc35b03..1260f20c75 100644
--- a/modules/admin-full/luasrc/controller/admin/network.lua
+++ b/modules/admin-full/luasrc/controller/admin/network.lua
@@ -280,6 +280,12 @@ function iface_reconnect()
end
luci.sys.call("env -i /sbin/ifup %q >/dev/null 2>/dev/null" % iface)
+
+ require "luci.fs"
+ if luci.fs.access("/etc/config/radvd") then
+ luci.sys.call("/etc/init.d/radvd restart >/dev/null 2>/dev/null")
+ end
+
luci.http.status(200, "Reconnected")
return
end
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
index 57a58056fe..cf540cf463 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
@@ -22,6 +22,7 @@ arg[1] = arg[1] or ""
local has_dnsmasq = fs.access("/etc/config/dhcp")
local has_firewall = fs.access("/etc/config/firewall")
+local has_radvd = fs.access("/etc/config/radvd")
local has_3g = fs.access("/usr/bin/gcom")
local has_pptp = fs.access("/usr/sbin/pptp")
@@ -39,6 +40,10 @@ if has_firewall then
m:chain("firewall")
end
+if has_radvd then
+ m:chain("radvd")
+end
+
nw.init(m.uci)
fw.init(m.uci)