diff options
author | Bjarke Istrup Pedersen <gurligebis@gentoo.org> | 2009-11-21 12:03:22 +0000 |
---|---|---|
committer | Bjarke Istrup Pedersen <gurligebis@gentoo.org> | 2009-11-21 12:03:22 +0000 |
commit | a2cbfee50430538d8264f37ca8c370d319c4b975 (patch) | |
tree | 932349b4ea5bd7e10f27ecabd7cb8e6419813c81 /net-wireless | |
parent | Fixing vboxwebsrv path for #293791 (diff) | |
download | gentoo-2-a2cbfee50430538d8264f37ca8c370d319c4b975.tar.gz gentoo-2-a2cbfee50430538d8264f37ca8c370d319c4b975.tar.bz2 gentoo-2-a2cbfee50430538d8264f37ca8c370d319c4b975.zip |
Fixing bug #293443
(Portage version: 2.2_rc44/cvs/Linux i686)
Diffstat (limited to 'net-wireless')
4 files changed, 88 insertions, 2 deletions
diff --git a/net-wireless/wpa_supplicant/ChangeLog b/net-wireless/wpa_supplicant/ChangeLog index 6ffa6397ee18..8aba1319b0e9 100644 --- a/net-wireless/wpa_supplicant/ChangeLog +++ b/net-wireless/wpa_supplicant/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-wireless/wpa_supplicant # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.124 2009/10/06 17:34:11 ayoy Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.125 2009/11/21 12:03:21 gurligebis Exp $ + + 21 Nov 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org> + wpa_supplicant-0.6.9.ebuild, +files/wpa_supplicant-conf.d, + +files/wpa_supplicant-init.d: + Adding init script and conf.d file, fixing bug #293443 06 Oct 2009; Dominik Kapusta <ayoy@gentoo.org> wpa_supplicant-0.6.4.ebuild: diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-conf.d b/net-wireless/wpa_supplicant/files/wpa_supplicant-conf.d new file mode 100644 index 000000000000..104b9dc5d8c3 --- /dev/null +++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-conf.d @@ -0,0 +1,6 @@ +# conf.d file for wpa_supplicant +# +# Please check man 8 wpa_supplicant for more information about the options +# wpa_supplicant accepts. +# +wpa_supplicant_args="" diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-init.d b/net-wireless/wpa_supplicant/files/wpa_supplicant-init.d new file mode 100644 index 000000000000..8429a3733840 --- /dev/null +++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-init.d @@ -0,0 +1,70 @@ +#!/sbin/runscript +# Copyright (c) 2009 Roy Marples <roy@marples.name> +# All rights reserved. Released under the 2-clause BSD license. + +command=/usr/sbin/wpa_supplicant +: ${wpa_supplicant_conf:=/etc/wpa_supplicant/wpa_supplicant.conf} +wpa_supplicant_if=${wpa_supplicant_if:+-i}$wpa_supplicant_if +command_args="$wpa_supplicant_args -B -c$wpa_supplicant_conf $wpa_supplicant_if" +name="WPA Supplicant Daemon" + +depend() +{ + need localmount + use logger + after bootmisc modules + before dns dhcpcd net + keyword -shutdown +} + +find_wireless() +{ + local iface= + + case "$RC_UNAME" in + Linux) + for iface in /sys/class/net/*; do + if [ -e "$iface"/wireless -o \ + -e "$iface"/phy80211 ] + then + echo "${iface##*/}" + return 0 + fi + done + ;; + *) + for iface in /dev/net/* $(ifconfig -l 2>/dev/null); do + if ifconfig "${iface##*/}" 2>/dev/null | \ + grep -q "[ ]*ssid " + then + echo "${iface##*/}" + return 0 + fi + done + ;; + esac + + return 1 +} + +append_wireless() +{ + local iface= i= + + iface=$(find_wireless) + if [ -n "$iface" ]; then + for i in $iface; do + command_args="$command_args -i$i" + done + else + eerror "Could not find a wireless interface" + fi +} + +start_pre() +{ + case " $command_args" in + *" -i"*) ;; + *) append_wireless;; + esac +} diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-0.6.9.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-0.6.9.ebuild index add9c285a5cc..79b2403f454b 100644 --- a/net-wireless/wpa_supplicant/wpa_supplicant-0.6.9.ebuild +++ b/net-wireless/wpa_supplicant/wpa_supplicant-0.6.9.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.6.9.ebuild,v 1.7 2009/07/24 16:42:43 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.6.9.ebuild,v 1.8 2009/11/21 12:03:21 gurligebis Exp $ EAPI="2" @@ -190,6 +190,11 @@ src_install() { dosym /usr/bin/wpa_cli /bin/wpa_cli || die fi + if has_version ">=sys-apps/openrc-0.5.0"; then + newinitd "$FILESDIR"/${PN}-init.d wpa_supplicant + newconfd "$FILESDIR"/${PN}-conf.d wpa_supplicant + fi + exeinto /etc/wpa_supplicant/ newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh |