]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
committing changes in /etc after emerge run
authorfrank <frank@bruni.home.brehm-online.com>
Mon, 16 Jan 2012 06:31:40 +0000 (07:31 +0100)
committerFrank Brehm <root@bruni.home.brehm-online.com>
Mon, 16 Jan 2012 06:31:40 +0000 (07:31 +0100)
Package changes:
+net-wireless/wpa_supplicant-0.7.3-r5

.etckeeper
conf.d/wpa_supplicant [new file with mode: 0644]
dbus-1/system.d/wpa_supplicant.conf [new file with mode: 0644]
init.d/wpa_supplicant [new file with mode: 0755]
wpa_supplicant/wpa_cli.sh [new file with mode: 0755]

index ea4e778d915e391d1668cf78e9e08e4efcb08a94..611b7c8f8018efcd69e46f6d64f845459b134d34 100755 (executable)
@@ -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 (file)
index 0000000..104b9dc
--- /dev/null
@@ -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 (file)
index 0000000..c091234
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE busconfig PUBLIC
+ "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+        <policy user="root">
+                <allow own="fi.epitest.hostap.WPASupplicant"/>
+
+                <allow send_destination="fi.epitest.hostap.WPASupplicant"/>
+                <allow send_interface="fi.epitest.hostap.WPASupplicant"/>
+
+                <allow own="fi.w1.wpa_supplicant1"/>
+
+                <allow send_destination="fi.w1.wpa_supplicant1"/>
+                <allow send_interface="fi.w1.wpa_supplicant1"/>
+                <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
+        </policy>
+        <policy context="default">
+                <deny own="fi.epitest.hostap.WPASupplicant"/>
+                <deny send_destination="fi.epitest.hostap.WPASupplicant"/>
+                <deny send_interface="fi.epitest.hostap.WPASupplicant"/>
+
+                <deny own="fi.w1.wpa_supplicant1"/>
+                <deny send_destination="fi.w1.wpa_supplicant1"/>
+                <deny send_interface="fi.w1.wpa_supplicant1"/>
+                <deny receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
+        </policy>
+</busconfig>
diff --git a/init.d/wpa_supplicant b/init.d/wpa_supplicant
new file mode 100755 (executable)
index 0000000..8429a37
--- /dev/null
@@ -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/wpa_supplicant/wpa_cli.sh b/wpa_supplicant/wpa_cli.sh
new file mode 100755 (executable)
index 0000000..4fd0d2c
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+# Copyright 1999-2011 Gentoo Foundation
+# Written by Roy Marples <uberlord@gentoo.org>
+# 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"