From 21c441c5d1be85f0939484bb26f3f70e3ea453b7 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 26 Nov 2010 16:50:11 +0000 Subject: [PATCH] modules/admin-full: honour keep settings choice on firmware upgrade --- modules/admin-full/luasrc/controller/admin/system.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.25.1