diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2019-08-27 16:55:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-27 16:55:44 +0300 |
commit | 04d454ced19b05428f866e20c81a20dca62d627e (patch) | |
tree | e1591d795e123abdeb277cdb61566a7ff3c9184e /applications | |
parent | 63b14abf6d80837019c2e6813eb8593e269608a9 (diff) | |
parent | 68a71eead45d53fdea6a9fd23c2a30d4dce99397 (diff) |
Merge pull request #3014 from stangri/master-luci-app-advanced-reboot
luci-app-advanced-reboot: bugfix for when network.lan.ipaddr is a table
Diffstat (limited to 'applications')
-rw-r--r-- | applications/luci-app-advanced-reboot/Makefile | 2 | ||||
-rw-r--r-- | applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/applications/luci-app-advanced-reboot/Makefile b/applications/luci-app-advanced-reboot/Makefile index 5381059da7..329acece4f 100644 --- a/applications/luci-app-advanced-reboot/Makefile +++ b/applications/luci-app-advanced-reboot/Makefile @@ -13,7 +13,7 @@ LUCI_DESCRIPTION:=Provides Web UI (found under System/Advanced Reboot) to reboot LUCI_DEPENDS:=+luci-mod-admin-full LUCI_PKGARCH:=all -PKG_RELEASE:=41 +PKG_RELEASE:=42 include ../../luci.mk 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 |