diff options
author | Guido Lipke <lipkegu@gmail.com> | 2016-05-23 13:16:04 +0200 |
---|---|---|
committer | Guido Lipke <lipkegu@gmail.com> | 2016-05-23 13:16:04 +0200 |
commit | 350ace252465d1135e41cb38d7feebc093d8a4ce (patch) | |
tree | a1123757e22708db4a441162fdca29dfe61e3835 /modules/luci-mod-admin-full/luasrc/controller/admin/system.lua | |
parent | 6415c04d1342162bad16874653189b3780cdbd04 (diff) |
luci-mod-admin-full: Look also if the file /etc/config/fstab exists.
This pull request adds a condition, which checks whether the file "/etc/config/fstab" exists before it allows access to "mount points".
Signed-off-by: Guido Lipke <lipkegu@gmail.com>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller/admin/system.lua')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/controller/admin/system.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua index 5b80f20783..fd6dda1c80 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua @@ -21,7 +21,7 @@ function index() entry({"admin", "system", "startup"}, form("admin_system/startup"), _("Startup"), 45) entry({"admin", "system", "crontab"}, form("admin_system/crontab"), _("Scheduled Tasks"), 46) - if fs.access("/sbin/block") then + if fs.access("/sbin/block") and fs.access("/etc/config/fstab") then entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), _("Mount Points"), 50) entry({"admin", "system", "fstab", "mount"}, cbi("admin_system/fstab/mount"), nil).leaf = true entry({"admin", "system", "fstab", "swap"}, cbi("admin_system/fstab/swap"), nil).leaf = true |