summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2009-02-16 21:58:12 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2009-02-16 21:58:12 +0000
commit990fcffbe0448cc93c87db1c4a3b88e8bc40f22a (patch)
tree5aaf1d4d5ffc43985c98b5cb92842dc1ec31eb78 /net-wireless/hostapd/files
parentwhitespace (diff)
downloadgentoo-2-990fcffbe0448cc93c87db1c4a3b88e8bc40f22a.tar.gz
gentoo-2-990fcffbe0448cc93c87db1c4a3b88e8bc40f22a.tar.bz2
gentoo-2-990fcffbe0448cc93c87db1c4a3b88e8bc40f22a.zip
Bumping to 0.6.8
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'net-wireless/hostapd/files')
-rw-r--r--net-wireless/hostapd/files/hostapd-0.6.8-conf.d9
-rw-r--r--net-wireless/hostapd/files/hostapd-0.6.8-init.d50
2 files changed, 59 insertions, 0 deletions
diff --git a/net-wireless/hostapd/files/hostapd-0.6.8-conf.d b/net-wireless/hostapd/files/hostapd-0.6.8-conf.d
new file mode 100644
index 000000000000..7d05735eb3b4
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-0.6.8-conf.d
@@ -0,0 +1,9 @@
+# Space separated List of interfaces which needs to be started before
+# hostapd
+INTERFACES="wlan0"
+
+# Space separated list of configuration files
+CONFIGS="/etc/hostapd/hostapd.conf"
+
+# Extra options to pass to hostapd, see hostapd(8)
+OPTIONS=""
diff --git a/net-wireless/hostapd/files/hostapd-0.6.8-init.d b/net-wireless/hostapd/files/hostapd-0.6.8-init.d
new file mode 100644
index 000000000000..a207a625af60
--- /dev/null
+++ b/net-wireless/hostapd/files/hostapd-0.6.8-init.d
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-0.6.8-init.d,v 1.1 2009/02/16 21:58:12 gurligebis Exp $
+
+opts="start stop reload"
+
+depend() {
+ local iface
+
+ for iface in ${INTERFACES}; do
+ need net.${iface}
+ done
+
+ use logger
+}
+
+checkconfig() {
+ local file
+
+ for file in ${CONFIGS}; do
+ if [[ ! -r ${file} ]]; then
+ eerror "hostapd configuration file (${CONFIG}) not found"
+ return 1
+ fi
+ done
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting hostapd"
+ start-stop-daemon --start --exec /usr/sbin/hostapd \
+ -- -B ${OPTIONS} ${CONFIGS}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping hostapd"
+ start-stop-daemon --stop --exec /usr/sbin/hostapd
+ eend ${?}
+}
+
+reload() {
+ checkconfig || return 1
+
+ ebegin "Reloading hostapd configuration"
+ kill -HUP $(pidof /usr/sbin/hostapd) > /dev/null 2>&1
+ eend ${?}
+}