wifi-scripts: ucode: check wpa_supplicant exists before mesh probe

The mesh capability check unconditionally ran wpa_supplicant -vmesh to
detect driver support. On devices where wpa_supplicant is not installed,
this produces a "/bin/sh: wpa_supplicant: not found" error in the logs
on every wifi reconfiguration even when no mesh interface is configured.

Guard the invocation with fs.access() so the binary is only executed
when it is actually present, and use its absolute path to avoid relying
on $PATH.

Signed-off-by: Florian Maurer <fmaurer@disroot.org>
Link: https://github.com/openwrt/openwrt/pull/23607
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
Florian Maurer
2026-05-31 21:04:41 +00:00
committed by Jonas Jelonek
parent 010e8b731a
commit 946b820856
@@ -250,7 +250,7 @@ function setup() {
break;
// fallthrough
case 'mesh':
supplicant_mesh ??= !system("wpa_supplicant -vmesh");
supplicant_mesh ??= (fs.access('/usr/sbin/wpa_supplicant', 'x') && !system("/usr/sbin/wpa_supplicant -vmesh"));
if (mode == "mesh" && !supplicant_mesh)
break;
// fallthrough