diff options
author | Giovanni Giacobbi <giovanni@giacobbi.net> | 2021-01-16 15:30:03 +0100 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2021-01-20 17:48:16 +0200 |
commit | af422b192462813150863752f9c300af55df4996 (patch) | |
tree | ef07c2f73da55ba53792d792e287674f01ddd535 /modules/luci-mod-admin-mini/luasrc/controller | |
parent | d3280e6f5df17b799230e229c9472cf8854015ae (diff) |
treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
Diffstat (limited to 'modules/luci-mod-admin-mini/luasrc/controller')
-rw-r--r-- | modules/luci-mod-admin-mini/luasrc/controller/mini/index.lua | 6 | ||||
-rw-r--r-- | modules/luci-mod-admin-mini/luasrc/controller/mini/system.lua | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/modules/luci-mod-admin-mini/luasrc/controller/mini/index.lua b/modules/luci-mod-admin-mini/luasrc/controller/mini/index.lua index dd25f2c52b..6228ad7c8d 100644 --- a/modules/luci-mod-admin-mini/luasrc/controller/mini/index.lua +++ b/modules/luci-mod-admin-mini/luasrc/controller/mini/index.lua @@ -10,14 +10,14 @@ function index() root.target = alias("mini") root.index = true end - + entry({"about"}, template("about")) - + local page = entry({"mini"}, alias("mini", "index"), _("Essentials"), 10) page.sysauth = "root" page.sysauth_authenticator = "htmlauth" page.index = true - + entry({"mini", "index"}, alias("mini", "index", "index"), _("Overview"), 10).index = true entry({"mini", "index", "index"}, form("mini/index"), _("General"), 1).ignoreindex = true entry({"mini", "index", "luci"}, cbi("mini/luci", {autoapply=true}), _("Settings"), 10) diff --git a/modules/luci-mod-admin-mini/luasrc/controller/mini/system.lua b/modules/luci-mod-admin-mini/luasrc/controller/mini/system.lua index 74a5ae4d36..b23193a170 100644 --- a/modules/luci-mod-admin-mini/luasrc/controller/mini/system.lua +++ b/modules/luci-mod-admin-mini/luasrc/controller/mini/system.lua @@ -17,8 +17,8 @@ function action_backup() local reset_avail = os.execute([[grep '"rootfs_data"' /proc/mtd >/dev/null 2>&1]]) == 0 local restore_cmd = "gunzip | tar -xC/ >/dev/null 2>&1" local backup_cmd = "tar -c %s | gzip 2>/dev/null" - - local restore_fpi + + local restore_fpi luci.http.setfilehandler( function(meta, chunk, eof) if not restore_fpi then @@ -32,11 +32,11 @@ function action_backup() end end ) - + local upload = luci.http.formvalue("archive") local backup = luci.http.formvalue("backup") local reset = reset_avail and luci.http.formvalue("reset") - + if upload and #upload > 0 then luci.template.render("mini/applyreboot") luci.sys.reboot() @@ -66,7 +66,7 @@ function action_upgrade() require("luci.model.uci") local tmpfile = "/tmp/firmware.img" - + local function image_supported() -- XXX: yay... return ( 0 == os.execute( @@ -76,11 +76,11 @@ function action_upgrade() % tmpfile ) ) end - + local function image_checksum() return (luci.sys.exec("md5sum %q" % tmpfile):match("^([^%s]+)")) end - + local function storage_size() local size = 0 if nixio.fs.access("/proc/mtd") then @@ -128,9 +128,9 @@ function action_upgrade() local has_support = image_supported() local has_platform = nixio.fs.access("/lib/upgrade/platform.sh") local has_upload = luci.http.formvalue("image") - + -- This does the actual flashing which is invoked inside an iframe - -- so don't produce meaningful errors here because the the + -- so don't produce meaningful errors here because the the -- previous pages should arrange the stuff as required. if step == 4 then if has_platform and has_image and has_support then @@ -163,7 +163,7 @@ function action_upgrade() if has_image then nixio.fs.unlink(tmpfile) end - + luci.template.render("mini/upgrade", { step=1, bad_image=(has_image and not has_support or false), @@ -180,14 +180,14 @@ function action_upgrade() flashsize=storage_size(), keepconfig=(keep_avail and luci.http.formvalue("keepcfg") == "1") } ) - + -- Step 3: load iframe which calls the actual flash procedure elseif step == 3 then luci.template.render("mini/upgrade", { step=3, keepconfig=(keep_avail and luci.http.formvalue("keepcfg") == "1") } ) - end + end end function _keep_pattern() |