From 60a9f019780f43a1b9d198451bd20ee8ae66f2aa Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 26 Sep 2022 10:50:40 +0200 Subject: [PATCH] luci-base: sys.uc: increase init script START/STOP search space Some init scripts, such as the sysfsutils one, declare their START or STOP variables very late in the file. Duplicate the search buffer to 2048 byte in order to catch these cases. Signed-off-by: Jo-Philipp Wich --- modules/luci-base/ucode/sys.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/ucode/sys.uc b/modules/luci-base/ucode/sys.uc index d4db91a9b9..5bbaa8b19d 100644 --- a/modules/luci-base/ucode/sys.uc +++ b/modules/luci-base/ucode/sys.uc @@ -121,7 +121,7 @@ export function init_list() { }; export function init_index(name) { - const src = readfile(`/etc/init.d/${basename(name)}`, 1024); + const src = readfile(`/etc/init.d/${basename(name)}`, 2048); const idx = []; for (let m in match(src, /^[[:space:]]*(START|STOP)=('[0-9][0-9]'|"[0-9][0-9]"|[0-9][0-9])[[:space:]]*$/gs)) {