fix(openwrt): allow opkg-not-found error through RPC sanitizer

"opkg not found at /usr/bin/opkg" was being swallowed by the error
sanitizer and shown as generic "Operation failed". Also fix bare
`opkg list-installed` call in get-status handler to use full path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ssmithx 2026-06-29 13:42:07 +00:00
parent bc1ec9aa3e
commit 58266dea66
2 changed files with 2 additions and 1 deletions

View File

@ -69,6 +69,7 @@ pub(super) fn sanitize_error_message(msg: &str) -> String {
"No space left",
"TollGate installation failed",
"No pre-built TollGate",
"opkg not found",
];
for prefix in &user_facing_prefixes {
if msg.starts_with(prefix) {

View File

@ -92,7 +92,7 @@ impl RpcHandler {
// TollGate
let tollgate_installed = router
.run("opkg list-installed | grep -q '^tollgate-module-basic-go '")
.run("/usr/bin/opkg list-installed | grep -q '^tollgate-module-basic-go '")
.map(|(_, code)| code == 0)
.unwrap_or(false);