diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2018-01-21 15:25:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-21 15:25:41 +0200 |
commit | cfd6f9bdb44437a2e705ede71e022ae66209b285 (patch) | |
tree | 884288ca73a5b5a70f666c6370dc5d8ebd246c37 /applications | |
parent | 61295d92340fe42b020ea2d6c00e71793bc6a76a (diff) | |
parent | 57fe3e839fdf30a2831934d7e1cd2fab7e521dfe (diff) |
Merge pull request #1576 from stangri/luci-app-advanced-reboot
luci-app-advanced-reboot: fixed bug on devices/board names with dashe…
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 | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/applications/luci-app-advanced-reboot/Makefile b/applications/luci-app-advanced-reboot/Makefile index 5722b429e..bb545a204 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 LUCI_PKGARCH:=all -PKG_RELEASE:=25 +PKG_RELEASE:=26 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 90824888e..0f512df63 100644 --- a/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua +++ b/applications/luci-app-advanced-reboot/luasrc/controller/advanced_reboot.lua @@ -3,7 +3,7 @@ module("luci.controller.advanced_reboot", package.seeall) --- device, board_name, part1, part2, offset, env_var_1, value_1_1, value_1_2, env_var_2, value_2_1, value_2_2 +-- device_name, board_name, part1, part2, offset, env_var_1, value_1_1, value_1_2, env_var_2, value_2_1, value_2_2 devices = { {"Linksys EA3500", "linksys-audi", "mtd3", "mtd5", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, {"Linksys E4200v2/EA4500", "linksys-viper", "mtd3", "mtd5", 32, "boot_part", 1, 2, "bootcmd", "run nandboot", "run altnandboot"}, @@ -17,9 +17,10 @@ devices = { } errorMessage = "" -board_name = luci.util.trim(luci.sys.exec("cat /tmp/sysinfo/board_name")) +device_board_name = luci.util.trim(luci.sys.exec("cat /tmp/sysinfo/board_name")) for i=1, #devices do - if board_name and string.match(board_name, devices[i][2]) then + table_board_name = devices[i][2]:gsub('-','') + if device_board_name and device_board_name:gsub('-',''):match(table_board_name) then device_name = devices[i][1] partition_one_mtd = devices[i][3] or nil partition_two_mtd = devices[i][4] or nil |