From 350ace252465d1135e41cb38d7feebc093d8a4ce Mon Sep 17 00:00:00 2001 From: Guido Lipke Date: Mon, 23 May 2016 13:16:04 +0200 Subject: [PATCH] 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 --- modules/luci-mod-admin-full/luasrc/controller/admin/system.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.0