From: Florian Maurer Date: Sun, 31 May 2026 21:04:41 +0000 (+0000) Subject: wifi-scripts: ucode: check wpa_supplicant exists before mesh probe X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F23607%2Fhead;p=thirdparty%2Fopenwrt.git 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 Link: https://github.com/openwrt/openwrt/pull/23607 Signed-off-by: Jonas Jelonek --- diff --git a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh index 3ed59fba16c..fa924cb1db1 100755 --- a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh +++ b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh @@ -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