luci-app-advanced-reboot: fix faulty ip.new() invocation
authorJo-Philipp Wich <jo@mein.io>
Thu, 30 Jan 2020 07:32:16 +0000 (08:32 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 30 Jan 2020 07:32:16 +0000 (08:32 +0100)
Ref: https://github.com/openwrt/luci/issues/3587#issuecomment-580044459
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua

index 097c71d676f8939d7cdfc11a93f1fb4bae801c80..512626351f722842b1e1a3e14d8afe594cf8dfd6 100644 (file)
@@ -183,7 +183,7 @@ function action_reboot()
        ltemplate.render("advanced_reboot/applyreboot", {
                                title = i18n.translate("Rebooting..."),
                                msg   = i18n.translate("The system is rebooting now.<br /> DO NOT POWER OFF THE DEVICE!<br /> Wait a few minutes before you try to reconnect. It might be necessary to renew the address of your computer to reach the device again, depending on your settings."),
-                               addr  = ip.new(util.imatch(ip)() or "192.168.1.1")
+                               addr  = ip.new(util.imatch(uci:get("network", "lan", "ipaddr"))() or "192.168.1.1")
                        })
        sys.reboot()
 end