diff options
author | Stan Grishin <stangri@melmac.net> | 2019-08-26 23:07:37 -0700 |
---|---|---|
committer | Stan Grishin <stangri@melmac.net> | 2019-08-26 23:07:37 -0700 |
commit | 68a71eead45d53fdea6a9fd23c2a30d4dce99397 (patch) | |
tree | 305fef9e164dd7139b01a41761f444d2b95f84ff /applications/luci-app-advanced-reboot/luasrc | |
parent | f8e30d5695c612ff70e4c5cf77589d29a92bd514 (diff) |
luci-app-advanced-reboot: bugfix for when network.lan.ipaddr is a table
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'applications/luci-app-advanced-reboot/luasrc')
-rw-r--r-- | applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua index e1f6daac18..7332424866 100644 --- a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua +++ b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua @@ -88,10 +88,11 @@ end function action_reboot() local uci = require "luci.model.uci".cursor() + local ip = uci:get("network", "lan", "ipaddr") luci.template.render("admin_system/applyreboot", { title = luci.i18n.translate("Rebooting..."), msg = luci.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 = luci.ip.new(uci:get("network", "lan", "ipaddr")) or "192.168.1.1" + addr = luci.ip.new(type(ip) == "string" and ip or "192.168.1.1") or "192.168.1.1" }) luci.sys.reboot() end |