summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-11-26 16:50:11 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-11-26 16:50:11 +0000
commit21c441c5d1be85f0939484bb26f3f70e3ea453b7 (patch)
tree20693178cb53289552fecff7801f834db72a3ce0 /modules/admin-full
parent0ba2c5c66135d9f38e14deda5c97d6f5965d6a0c (diff)
modules/admin-full: honour keep settings choice on firmware upgrade
Diffstat (limited to 'modules/admin-full')
-rw-r--r--modules/admin-full/luasrc/controller/admin/system.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/system.lua b/modules/admin-full/luasrc/controller/admin/system.lua
index 2e71e7902..67dbc3fc7 100644
--- a/modules/admin-full/luasrc/controller/admin/system.lua
+++ b/modules/admin-full/luasrc/controller/admin/system.lua
@@ -264,7 +264,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