From 757e5d909c9f41a653ee6d3a6b21da2aa6ea766d Mon Sep 17 00:00:00 2001 From: Rémy Oudompheng Date: Sat, 11 Jun 2011 23:38:26 +0200 Subject: wireless: add proper option to wpa_cli to find files in /run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Oudompheng --- src/8021x | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/8021x') diff --git a/src/8021x b/src/8021x index 53c02de..83952d6 100644 --- a/src/8021x +++ b/src/8021x @@ -8,9 +8,9 @@ wpa_check() 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 - eval $(wpa_cli -i "$INTERFACE" status 2> /dev/null | fgrep "wpa_state=") + eval $(wpa_cli -p /run/wpa_supplicant -i "$INTERFACE" status 2> /dev/null | fgrep "wpa_state=") else - eval $(wpa_cli -i "$INTERFACE" status | fgrep "wpa_state=") + eval $(wpa_cli -p /run/wpa_supplicant -i "$INTERFACE" status | fgrep "wpa_state=") fi [[ "$wpa_state" = "$CONDITION" ]] ) && return 0 @@ -40,7 +40,7 @@ start_wpa() stop_wpa() { - wpa_cli -i "$1" terminate &> /dev/null + wpa_cli -p /run/wpa_supplicant -i "$1" terminate &> /dev/null sleep 1 # JP: need this else the file tends to disappear after [[ -f ... ]] but before cat... # see if [[ -f "/run/wpa_supplicant_$1.pid" ]]; then -- cgit v1.2.3-24-g4f1b