From f561dda7a2d0dac26aea6756593652c4e14069ee Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Wed, 4 Feb 2026 16:39:50 +0100 Subject: [PATCH] fix(rpcd): Wrap call handlers in function for BusyBox ash local keyword compatibility BusyBox ash rejects `local` outside a function. Both RPCD handlers used `local` directly in the case block, causing "not in a function" errors and silent RPC failures (empty responses). Co-Authored-By: Claude Opus 4.5 --- .../root/usr/libexec/rpcd/luci.device-intel | 7 +++++-- .../root/usr/libexec/rpcd/luci.dns-provider | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/package/secubox/luci-app-device-intel/root/usr/libexec/rpcd/luci.device-intel b/package/secubox/luci-app-device-intel/root/usr/libexec/rpcd/luci.device-intel index 426a0849..93227974 100644 --- a/package/secubox/luci-app-device-intel/root/usr/libexec/rpcd/luci.device-intel +++ b/package/secubox/luci-app-device-intel/root/usr/libexec/rpcd/luci.device-intel @@ -40,7 +40,8 @@ case "$1" in ;; call) - case "$2" in + handle_call() { + case "$1" in get_devices) . "${DI_LIB}/functions.sh" local devices=$(di_get_devices) @@ -239,10 +240,12 @@ case "$1" in *) json_init json_add_boolean "error" 1 - json_add_string "message" "Unknown method: $2" + json_add_string "message" "Unknown method: $1" json_dump ;; esac + } + handle_call "$2" ;; esac diff --git a/package/secubox/luci-app-dns-provider/root/usr/libexec/rpcd/luci.dns-provider b/package/secubox/luci-app-dns-provider/root/usr/libexec/rpcd/luci.dns-provider index 35206751..df075b5c 100644 --- a/package/secubox/luci-app-dns-provider/root/usr/libexec/rpcd/luci.dns-provider +++ b/package/secubox/luci-app-dns-provider/root/usr/libexec/rpcd/luci.dns-provider @@ -39,7 +39,8 @@ case "$1" in ;; call) - case "$2" in + handle_call() { + case "$1" in get_config) json_init @@ -241,10 +242,12 @@ case "$1" in *) json_init json_add_boolean "error" 1 - json_add_string "message" "Unknown method: $2" + json_add_string "message" "Unknown method: $1" json_dump ;; esac + } + handle_call "$2" ;; esac