diff options
| author | Roy Marples <roy@marples.name> | 2007-11-21 15:39:43 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2007-11-21 15:39:43 +0000 | 
| commit | 2b1a864bc42cff3a9daae42418608d2b5b69dad0 (patch) | |
| tree | 2bc2745ae5d53f8ca3004d0191bd5e7b02b5f3e0 /net | |
| parent | 58bea85f922549b88efb8fc163ad8c82de4fdfd1 (diff) | |
| download | openrc-2b1a864bc42cff3a9daae42418608d2b5b69dad0.tar.xz | |
BSD shouldn't need to use wpa_cli to manage link events
Diffstat (limited to 'net')
| -rw-r--r-- | net/wpa_supplicant.sh | 14 | 
1 files changed, 12 insertions, 2 deletions
diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh index 63c37c35..1bdbb9c1 100644 --- a/net/wpa_supplicant.sh +++ b/net/wpa_supplicant.sh @@ -70,6 +70,7 @@ wpa_supplicant_pre_start() {  		wpas=/sbin/wpa_supplicant  		wpac=/bin/wpa_cli  	fi +	[ "${RC_UNAME}" = "Linux" ] || unset wpac  	eval opts=\$wpa_supplicant_${IFVAR}  	case " ${opts} " in @@ -92,7 +93,6 @@ wpa_supplicant_pre_start() {  	save_options "SSID" ""  	ebegin "Starting wpa_supplicant on" "${IFVAR}" -  	if [ -x /sbin/iwconfig ] ; then  		local x=  		for x in txpower rate rts frag ; do @@ -139,11 +139,21 @@ wpa_supplicant_pre_start() {  	actfile="/etc/wpa_supplicant/wpa_cli.sh" +	if [ -n "${wpac}" ]; then +		opts="${opts} -W" +	else +		sleep 2 # FBSD 7.0 beta2 bug +		mark_service_inactive "${SVCNAME}" +	fi  	start-stop-daemon --start --exec "${wpas}" \  		--pidfile "/var/run/wpa_supplicant-${IFACE}.pid" \ -		-- ${opts} -W -B -i "${IFACE}" \ +		-- ${opts} -B -i "${IFACE}" \  		-P "/var/run/wpa_supplicant-${IFACE}.pid"  	eend $? || return 1 +	if [ -z "${wpac}" ]; then +		ebegin "Backgrounding ..." +		exit 1  +	fi  	# Starting wpa_supplication-0.4.0, we can get wpa_cli to  	# start/stop our scripts from wpa_supplicant messages  | 
