From a1fc17107a833d0a55bca8b14d3244b7788adf86 Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sat, 30 Jul 2011 20:57:29 +0200 Subject: Use configured control path for wpa_supplicant (FS#24949) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the wpa_cli calls may fail if the specified ctrl_interface directory differs from the default one. Signed-off-by: Rémy Oudompheng --- src/8021x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/8021x') diff --git a/src/8021x b/src/8021x index 2b897b9..3de0a00 100644 --- a/src/8021x +++ b/src/8021x @@ -1,5 +1,3 @@ -WPA_CTRL_PATH=/run/wpa_supplicant - # Uses wpa_supplicant to check for association to a network # wpa_check interface [timeout] wpa_check() @@ -7,6 +5,7 @@ wpa_check() local timeout=0 INTERFACE="$1" TIMEOUT="${2:-15}" CONDITION="${3:-COMPLETED}" # CONDITION is required as wired connections are ready at ASSOCIATED not COMPLETED FS#20150 + report_debug wpa_cli -p "$WPA_CTRL_PATH" -i "$INTERFACE" status while [[ $timeout -lt "$TIMEOUT" ]]; do ( # Sometimes wpa_supplicant isn't ready so silence errors for 2s only to avoid hiding real errors if [[ $timeout -lt 2 ]]; then @@ -97,6 +96,7 @@ wpa_supplicant_scan_and_find() { # item = string to lookup local INTERFACE="$1" FIELD="$2" ITEM="$3" RETRIES=5 try scan_ok scan_ok=0 + report_debug wpa_cli -p "$WPA_CTRL_PATH" -i "$INTERFACE" scan wpa_cli -p "$WPA_CTRL_PATH" -i "$INTERFACE" scan &> /dev/null for ((try=0; try < $RETRIES; try++)); do local found -- cgit v1.2.3-24-g4f1b