modules/admin-full: cope with missing wireless or dnsmasq config, hide menu points...
[project/luci.git] / modules / admin-full / luasrc / controller / admin / services.lua
index d2fab8a..b88e8ab 100644 (file)
@@ -46,9 +46,11 @@ function index()
        page.target = cbi("admin_services/dropbear")
        page.title  = "Dropbear SSHd"
        page.order  = 20
        page.target = cbi("admin_services/dropbear")
        page.title  = "Dropbear SSHd"
        page.order  = 20
-       
-       local page  = node("admin", "services", "dnsmasq")
-       page.target = cbi("admin_services/dnsmasq")
-       page.title  = "Dnsmasq"
-       page.order  = 30
+
+       if nixio.fs.access("/etc/config/dhcp") then     
+               local page  = node("admin", "services", "dnsmasq")
+               page.target = cbi("admin_services/dnsmasq")
+               page.title  = "Dnsmasq"
+               page.order  = 30
+       end
 end
 end