modules/admin-full: rework fstab pages, include extroot options
[project/luci.git] / modules / admin-full / luasrc / controller / admin / system.lua
index 2e71e79..95961f4 100644 (file)
@@ -29,6 +29,8 @@ function index()
 
        if nixio.fs.access("/etc/config/fstab") then
                entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("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
        end
 
        if nixio.fs.access("/sys/class/leds") then
@@ -264,7 +266,9 @@ function action_upgrade()
 
                        -- Now invoke sysupgrade
                        local keepcfg = keep_avail and luci.http.formvalue("keepcfg") == "1"
-                       local flash = ltn12_popen("/sbin/sysupgrade %q" % tmpfile)
+                       local flash = ltn12_popen("/sbin/sysupgrade %s %q" %{
+                               keepcfg and "" or "-n", tmpfile
+                       })
 
                        luci.ltn12.pump.all(flash, luci.http.write)
                end