X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_system%2Ffstab.lua;fp=modules%2Fluci-mod-admin-full%2Fluasrc%2Fmodel%2Fcbi%2Fadmin_system%2Ffstab.lua;h=fd466d5c26563ab3a4c96877a9ec921ef0421a94;hp=e6f207b2e8ffa12779f8394b35a30d65964eac7f;hb=1d5cab4ced656d71e1913470b8b06e051bd492d3;hpb=89f74f77dab023393832a91551aca6e8a02030fb diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua index e6f207b2e..fd466d5c2 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua @@ -33,12 +33,19 @@ until not ln block:close() - m = Map("fstab", translate("Mount Points")) s = m:section(TypedSection, "global", translate("Global Settings")) s.addremove = false s.anonymous = true +detect = s:option(Button, "block_detect", translate("Generate Config"), translate("Find all currently attached filesystems and swap and replace configuration with defaults based on what was detected")) +detect.inputstyle = "reload" + +detect.write = function(self, section) + luci.sys.call("block detect >/etc/config/fstab") + luci.http.redirect(luci.dispatcher.build_url("admin/system", "fstab")) +end + o = s:option(Flag, "anon_swap", translate("Anonymous Swap"), translate("Mount swap not specifically configured")) o.default = o.disabled o.rmempty = false