From: Jo-Philipp Wich Date: Sat, 8 Oct 2011 21:43:50 +0000 (+0000) Subject: modules/admin-full: hide system software tab if opkg is not present X-Git-Tag: 0.11.0~1595 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4e538d09e12a7120fc25435ccc76f8b2b16a8b1e;p=oweals%2Fluci.git modules/admin-full: hide system software tab if opkg is not present --- diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index abfe1f5f1..f5b6b1493 100644 --- a/modules/admin-full/luasrc/controller/admin/system.lua +++ b/modules/admin-full/luasrc/controller/admin/system.lua @@ -19,8 +19,12 @@ function index() entry({"admin", "system"}, alias("admin", "system", "system"), _("System"), 30).index = true entry({"admin", "system", "system"}, cbi("admin_system/system"), _("System"), 1) entry({"admin", "system", "admin"}, cbi("admin_system/admin"), _("Administration"), 2) - entry({"admin", "system", "packages"}, call("action_packages"), _("Software"), 10) - entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg")) + + if nixio.fs.access("/bin/opkg") then + entry({"admin", "system", "packages"}, call("action_packages"), _("Software"), 10) + entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg")) + end + entry({"admin", "system", "startup"}, form("admin_system/startup"), _("Startup"), 45) if nixio.fs.access("/etc/config/fstab") then