modules/admin-full: honour keep settings choice on firmware upgrade

This commit is contained in:
Jo-Philipp Wich 2010-11-26 16:50:11 +00:00
parent 0ba2c5c661
commit 21c441c5d1

View file

@ -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