modules/admin-full: honour keep settings choice on firmware upgrade
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Nov 2010 16:50:11 +0000 (16:50 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 26 Nov 2010 16:50:11 +0000 (16:50 +0000)
modules/admin-full/luasrc/controller/admin/system.lua

index 2e71e79024261e431ac511e061c74cd03ae9c4f9..67dbc3fc7385c8c49978cdee813a90bfb077e828 100644 (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