From: frank Date: Mon, 16 Jan 2012 06:31:40 +0000 (+0100) Subject: committing changes in /etc after emerge run X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=ea9c9cc0dda97df075318ce29569fba9827044fd;p=config%2Fbruni%2Fetc.git committing changes in /etc after emerge run Package changes: +net-wireless/wpa_supplicant-0.7.3-r5 --- diff --git a/.etckeeper b/.etckeeper index ea4e778d..611b7c8f 100755 --- a/.etckeeper +++ b/.etckeeper @@ -83,6 +83,7 @@ maybe chmod 0644 './conf.d/svnserve' maybe chmod 0644 './conf.d/syslog-ng' maybe chmod 0644 './conf.d/udev' maybe chmod 0644 './conf.d/urandom' +maybe chmod 0644 './conf.d/wpa_supplicant' maybe chmod 0644 './conf.d/xinetd' maybe chmod 0700 './config-archive' maybe chmod 0755 './config-archive/etc' @@ -135,6 +136,7 @@ maybe chmod 0644 './dbus-1/system.d/ConsoleKit.conf' maybe chmod 0444 './dbus-1/system.d/cups.conf' maybe chmod 0644 './dbus-1/system.d/org.freedesktop.PolicyKit1.conf' maybe chmod 0644 './dbus-1/system.d/org.gnome.GConf.Defaults.conf' +maybe chmod 0644 './dbus-1/system.d/wpa_supplicant.conf' maybe chmod 0755 './default' maybe chmod 0600 './default/useradd' maybe chmod 0644 './dhcpcd.conf' @@ -370,6 +372,7 @@ maybe chmod 0755 './init.d/udev-postmount' maybe chmod 0755 './init.d/ulogd' maybe chmod 0755 './init.d/urandom' maybe chmod 0755 './init.d/vixie-cron' +maybe chmod 0755 './init.d/wpa_supplicant' maybe chmod 0755 './init.d/xinetd' maybe chmod 0644 './inittab' maybe chmod 0644 './inputrc' @@ -686,6 +689,8 @@ maybe chmod 0755 './vim' maybe chmod 0644 './vim/vimrc' maybe chmod 0644 './vim/vimrc.local' maybe chmod 0644 './wgetrc' +maybe chmod 0755 './wpa_supplicant' +maybe chmod 0755 './wpa_supplicant/wpa_cli.sh' maybe chmod 0755 './xdg' maybe chmod 0755 './xdg/autostart' maybe chmod 0644 './xdg/autostart/gnome-keyring-gpg.desktop' diff --git a/conf.d/wpa_supplicant b/conf.d/wpa_supplicant new file mode 100644 index 00000000..104b9dc5 --- /dev/null +++ b/conf.d/wpa_supplicant @@ -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/dbus-1/system.d/wpa_supplicant.conf b/dbus-1/system.d/wpa_supplicant.conf new file mode 100644 index 00000000..c091234f --- /dev/null +++ b/dbus-1/system.d/wpa_supplicant.conf @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/init.d/wpa_supplicant b/init.d/wpa_supplicant new file mode 100755 index 00000000..8429a373 --- /dev/null +++ b/init.d/wpa_supplicant @@ -0,0 +1,70 @@ +#!/sbin/runscript +# Copyright (c) 2009 Roy Marples +# 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/wpa_supplicant/wpa_cli.sh b/wpa_supplicant/wpa_cli.sh new file mode 100755 index 00000000..4fd0d2cd --- /dev/null +++ b/wpa_supplicant/wpa_cli.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# Copyright 1999-2011 Gentoo Foundation +# Written by Roy Marples +# Distributed under the terms of the GNU General Public License v2 +# Alternatively, this file may be distributed under the terms of the BSD License +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/files/wpa_cli.sh,v 1.3 2011/07/08 07:06:21 gurligebis Exp $ + +if [ -z "$1" -o -z "$2" ]; then + logger -t wpa_cli "Insufficient parameters" + exit 1 +fi + +INTERFACE="$1" +ACTION="$2" + +# Note, the below action must NOT mark the interface down via ifconfig, ip or +# similar. Addresses can be removed, changed and daemons can be stopped, but +# the interface must remain up for wpa_supplicant to work. + +if [ -f /etc/gentoo-release ]; then + EXEC="/etc/init.d/net.${INTERFACE} --quiet" +else + logger -t wpa_cli "I don't know what to do with this distro!" + exit 1 +fi + +case ${ACTION} in + CONNECTED) + EXEC="${EXEC} start" + ;; + DISCONNECTED) + # Deactivated, since stopping /etc/init.d/net.wlanX + # stops the network completly. + EXEC="false ${EXEC} stop" + ;; + *) + logger -t wpa_cli "Unknown action ${ACTION}" + exit 1 + ;; +esac + +# ${EXEC} can use ${IN_BACKGROUND} so that it knows that the user isn't +# stopping the interface and a background process - like wpa_cli - is. +export IN_BACKGROUND=true + +logger -t wpa_cli "interface ${INTERFACE} ${ACTION}" +${EXEC} || logger -t wpa_cli "executing '${EXEC}' failed"