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:
parent
bc1ec9aa3e
commit
58266dea66
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user