modules/admin-full: restart radvd if needed
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 21 Feb 2011 12:46:03 +0000 (12:46 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 21 Feb 2011 12:46:03 +0000 (12:46 +0000)
modules/admin-full/luasrc/controller/admin/network.lua
modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua

index 73efc35b03ec7915a9c59c2ca930bd4919ddc4cf..1260f20c75aad2449d521d21fc09fd82089a2321 100644 (file)
@@ -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
index 57a58056fe0554cd3fcb4865d417ef3809112e3f..cf540cf4636d598a408bb21a4f4ec6c1c9a02e23 100644 (file)
@@ -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)