From 946b820856057a801f596cc96df31c21eaa60f4f Mon Sep 17 00:00:00 2001 From: Florian Maurer Date: Sun, 31 May 2026 21:04:41 +0000 Subject: [PATCH] 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 --- .../wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.3