From 4e538d09e12a7120fc25435ccc76f8b2b16a8b1e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 8 Oct 2011 21:43:50 +0000 Subject: modules/admin-full: hide system software tab if opkg is not present --- modules/admin-full/luasrc/controller/admin/system.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules/admin-full/luasrc/controller/admin') diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua index abfe1f5f16..f5b6b1493c 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 -- cgit v1.2.3