diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-08 21:43:50 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-08 21:43:50 +0000 |
commit | 4e538d09e12a7120fc25435ccc76f8b2b16a8b1e (patch) | |
tree | d50c731f3f3600e91ddb2b2aacf9d1cde0c84810 /modules/admin-full | |
parent | c54c315cf17c5958fedb9e464be30f248d5dbeef (diff) |
modules/admin-full: hide system software tab if opkg is not present
Diffstat (limited to 'modules/admin-full')
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/system.lua | 8 |
1 files changed, 6 insertions, 2 deletions
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 |