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>
This commit is contained in:
parent
6415c04d13
commit
350ace2524
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ function index()
|
||||||
entry({"admin", "system", "startup"}, form("admin_system/startup"), _("Startup"), 45)
|
entry({"admin", "system", "startup"}, form("admin_system/startup"), _("Startup"), 45)
|
||||||
entry({"admin", "system", "crontab"}, form("admin_system/crontab"), _("Scheduled Tasks"), 46)
|
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"}, cbi("admin_system/fstab"), _("Mount Points"), 50)
|
||||||
entry({"admin", "system", "fstab", "mount"}, cbi("admin_system/fstab/mount"), nil).leaf = true
|
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
|
entry({"admin", "system", "fstab", "swap"}, cbi("admin_system/fstab/swap"), nil).leaf = true
|
||||||
|
|
Loading…
Reference in a new issue