From: Guido Lipke Date: Mon, 23 May 2016 11:16:04 +0000 (+0200) Subject: luci-mod-admin-full: Look also if the file /etc/config/fstab exists. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F728%2Fhead;p=oweals%2Fluci.git 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 --- 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 5b80f2078..fd6dda1c8 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