From 40da8174faae2610734e9dd1591c65cbea483459 Mon Sep 17 00:00:00 2001 From: Ryan Name Date: Fri, 22 May 2026 09:35:52 +0000 Subject: [PATCH 1/4] hal: add validation for UCI section types to support hyphens --- src/services/hal/backends/openwrt/uci_manager.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/services/hal/backends/openwrt/uci_manager.lua b/src/services/hal/backends/openwrt/uci_manager.lua index ad610e69..9e70b853 100644 --- a/src/services/hal/backends/openwrt/uci_manager.lua +++ b/src/services/hal/backends/openwrt/uci_manager.lua @@ -78,6 +78,11 @@ local function is_uci_identifier(s) return type(s) == 'string' and s ~= '' and s:match('^[A-Za-z0-9_]+$') ~= nil end +-- UCI section types (e.g. wifi-device, wifi-iface) may contain hyphens. +local function is_uci_section_type(s) + return type(s) == 'string' and s ~= '' and s:match('^[A-Za-z0-9_%-]+$') ~= nil +end + local function validate_pkg(s, label) if not is_uci_identifier(s) then return nil, label .. ' must be a non-empty UCI identifier' @@ -149,7 +154,7 @@ local function validate_change(record, ch, i) return nil, 'change ' .. i .. ' option/section type required' end if ch.value == nil then - if not is_uci_identifier(ch.option) then + if not is_uci_section_type(ch.option) then return nil, 'change ' .. i .. ' named section type must be a UCI identifier' end else From 264a4d831b7dbb3014702d827d54e4bea98eea17 Mon Sep 17 00:00:00 2001 From: Ryan Name Date: Fri, 22 May 2026 11:53:13 +0000 Subject: [PATCH 2/4] add credentials configuration to bigbox-v1-cm-2.json --- src/configs/bigbox-v1-cm-2.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/configs/bigbox-v1-cm-2.json b/src/configs/bigbox-v1-cm-2.json index 416623a1..99decc68 100644 --- a/src/configs/bigbox-v1-cm-2.json +++ b/src/configs/bigbox-v1-cm-2.json @@ -8,6 +8,10 @@ "name": "config", "root": "/data/devicecode/configs" }, + { + "name": "credentials", + "root": "/data/configs" + }, { "name": "state", "root": "/tmp/devicecode-state" From c42afe7c742cb77ed1b6eab3bf48f4b509fea2c3 Mon Sep 17 00:00:00 2001 From: Ryan Name Date: Fri, 22 May 2026 11:53:21 +0000 Subject: [PATCH 3/4] fix: update filesystem capability listener to use 'credentials' instead of 'configs' --- src/services/metrics.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/metrics.lua b/src/services/metrics.lua index eec75852..91bc2e65 100644 --- a/src/services/metrics.lua +++ b/src/services/metrics.lua @@ -556,7 +556,7 @@ function M.start(conn, opts) end) svc:obs_log('info', 'waiting for filesystem capability') - local fs_listener = cap_sdk.new_cap_listener(conn, 'fs', 'configs') + local fs_listener = cap_sdk.new_cap_listener(conn, 'fs', 'credentials') local fs_cap, cap_err = fs_listener:wait_for_cap() fs_listener:close() if not fs_cap then From 4accd093ff15a48d8f0ec67d2f355ac7c7eee544 Mon Sep 17 00:00:00 2001 From: Ryan Name Date: Fri, 22 May 2026 11:53:27 +0000 Subject: [PATCH 4/4] fix: update filesystem capability listener to use 'credentials' instead of 'configs' --- src/services/wifi.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/wifi.lua b/src/services/wifi.lua index 4ec1e339..bd405617 100644 --- a/src/services/wifi.lua +++ b/src/services/wifi.lua @@ -757,7 +757,7 @@ local function on_fs_cap(ctx, msg) local state = msg.payload if state == 'added' then ctx.svc:obs_log('info', { what = 'fs_configs_cap_added' }) - ctx.fs_configs_cap = cap_sdk.new_cap_ref(ctx.conn, 'fs', 'configs') + ctx.fs_configs_cap = cap_sdk.new_cap_ref(ctx.conn, 'fs', 'credentials') reapply_all_radios(ctx) elseif state == 'removed' then ctx.svc:obs_log('info', { what = 'fs_configs_cap_removed' }) @@ -810,7 +810,7 @@ function WifiService.start(conn, opts) -- Subscribe to cap state notifications (radio, band, fs/configs) local radio_cap_listener = cap_sdk.new_cap_listener(conn, 'radio', '+') local band_cap_listener = cap_sdk.new_cap_listener(conn, 'band', '1') - local fs_cap_listener = cap_sdk.new_cap_listener(conn, 'fs', 'configs') + local fs_cap_listener = cap_sdk.new_cap_listener(conn, 'fs', 'credentials') svc:status('running') svc:obs_log('info', 'service running')