From: Jo-Philipp Wich Date: Fri, 26 Nov 2010 16:50:11 +0000 (+0000) Subject: modules/admin-full: honour keep settings choice on firmware upgrade X-Git-Tag: 0.10.0~358 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=21c441c5d1be85f0939484bb26f3f70e3ea453b7;p=oweals%2Fluci.git modules/admin-full: honour keep settings choice on firmware upgrade --- 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