diff options
author | Christian Heim <phreak@gentoo.org> | 2005-11-22 13:39:09 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2005-11-22 13:39:09 +0000 |
commit | c88e338f00648357db221147be2c39cabdbd5dc7 (patch) | |
tree | 03f0d4bd79d12b4982e67f26df15bbdcf16a12a5 /net-scripts/net.modules.d/wpa_supplicant | |
parent | Merging uberlord's latest changes of baselayout (r1613). (diff) | |
download | baselayout-vserver-c88e338f00648357db221147be2c39cabdbd5dc7.tar.gz baselayout-vserver-c88e338f00648357db221147be2c39cabdbd5dc7.tar.bz2 baselayout-vserver-c88e338f00648357db221147be2c39cabdbd5dc7.zip |
Merging latest changes from baselayout (r1621).
svn path=/baselayout-vserver/trunk/; revision=68
Diffstat (limited to 'net-scripts/net.modules.d/wpa_supplicant')
-rw-r--r-- | net-scripts/net.modules.d/wpa_supplicant | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net-scripts/net.modules.d/wpa_supplicant b/net-scripts/net.modules.d/wpa_supplicant index 06a7296..285f06e 100644 --- a/net-scripts/net.modules.d/wpa_supplicant +++ b/net-scripts/net.modules.d/wpa_supplicant @@ -138,8 +138,9 @@ wpa_supplicant_kill() { # otherwise, 1 wpa_supplicant_associate() { local iface="$1" ifvar=$( bash_variable "$1" ) timeout i - eval timeout=\"\$\{associate_timeout_${ifvar}\}\" - [[ -z ${timeout} ]] && eval timeout=\"\$\{wpa_timeout_${ifvar}:--1\}\" + timeout="associate_timeout_${ifvar}" + [[ -z ${!timeout} ]] && timeout="wpa_timeout_${ifvar}" + timeout="${!timeout:--1}" if [[ ${timeout} == "0" ]]; then ewarn "WARNING: infinite timeout set for association on ${iface}" @@ -205,7 +206,8 @@ wpa_supplicant_pre_start() { save_options "ESSID" "" local ifvar=$( bash_variable "${iface}" ) - eval opts=\" \$\{wpa_supplicant_${ifvar}\} \" + opts="wpa_supplicant_${ifvar}" + opts=" ${!opts} " [[ ${opts} != *" -D"* ]] \ && ewarn "wpa_supplicant_${ifvar} does not define a driver" @@ -281,9 +283,9 @@ wpa_supplicant_pre_start() { [[ ${RC_PARALLEL_STARTUP} == "yes" ]] && background=no fi - start-stop-daemon --start --exec /sbin/wpa_supplicant \ + eval start-stop-daemon --start --exec /sbin/wpa_supplicant \ --pidfile "/var/run/wpa_supplicant-${iface}.pid" \ - -- ${opts} -B -i"${iface}" + -- "${opts}" -B -i"${iface}" eend "$?" || return 1 # Starting wpa_supplication-0.4.0, we can get wpa_cli to @@ -321,7 +323,7 @@ wpa_supplicant_pre_start() { ESSIDVAR=$( bash_variable "${ESSID}" ) save_options "ESSID" "${ESSID}" - local -a status=( "$( wpa_cli -i${iface} status | sed -n -e 's/^\(bssid\|pairwise_cipher\|key_mgmt\)=\([^=]\+\).*/\U\2/p' | tr '[:lower:]' '[:upper:]' )" ) + local -a status=( "$( wpa_cli -i${iface} status | sed -n -e 's/^\(bssid\|pairwise_cipher\|key_mgmt\)=\([^=]\+\).*/\"\U\2\"/p' | tr '[:lower:]' '[:upper:]' )" ) einfo "${iface} connected to \"${ESSID//\\\\/\\\\}\" at ${status[0]}" if [[ ${status[2]} == "NONE" ]]; then |