luci-mod-system: flash.js: upon sysupgrade, select reconnect ip by keep state
authorJo-Philipp Wich <jo@mein.io>
Fri, 1 Nov 2019 11:45:00 +0000 (12:45 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 1 Nov 2019 11:45:00 +0000 (12:45 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js

index 43840f4071eadda5d2cce50db6d95677c476cb32..440ed9acc8484f4158329114af151cf2181bacea 100644 (file)
@@ -299,7 +299,10 @@ return L.view.extend({
                /* Currently the sysupgrade rpc call will not return, hence no promise handling */
                fs.exec('/sbin/sysupgrade', opts);
 
-               L.ui.awaitReconnect(window.location.host, '192.168.1.1', 'openwrt.lan');
+               if (keep.checked)
+                       L.ui.awaitReconnect(window.location.host);
+               else
+                       L.ui.awaitReconnect('192.168.1.1', 'openwrt.lan');
        },
 
        handleBackupList: function(ev) {