summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2009-05-17 10:18:18 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2009-05-17 10:18:18 +0000
commitacbb43239029207b5fd2106697ef14b90fff8067 (patch)
tree9cc20ccb98562c15af907eaf147d6ed0811a2ffb /net-wireless
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-acbb43239029207b5fd2106697ef14b90fff8067.tar.gz
gentoo-2-acbb43239029207b5fd2106697ef14b90fff8067.tar.bz2
gentoo-2-acbb43239029207b5fd2106697ef14b90fff8067.zip
Fixing init script, so it is POSIX compliant, fixing bug #269063
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/hostapd/ChangeLog8
-rw-r--r--net-wireless/hostapd/files/hostapd-0.6.8-init.d22
-rw-r--r--net-wireless/hostapd/files/hostapd-0.6.9-init.d22
3 files changed, 28 insertions, 24 deletions
diff --git a/net-wireless/hostapd/ChangeLog b/net-wireless/hostapd/ChangeLog
index ec1d4d328667..db6301ac2053 100644
--- a/net-wireless/hostapd/ChangeLog
+++ b/net-wireless/hostapd/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-wireless/hostapd
-# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v 1.99 2009/04/15 22:25:11 gurligebis Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/ChangeLog,v 1.100 2009/05/17 10:18:17 gurligebis Exp $
+
+ 17 May 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
+ files/hostapd-0.6.8-init.d, files/hostapd-0.6.9-init.d:
+ Fixing init script, so it is POSIX compliant, fixing bug #269063
16 Apr 2009; Bjarke Istrup Pedersen <gurligebis@gentoo.org>
hostapd-0.6.9.ebuild:
diff --git a/net-wireless/hostapd/files/hostapd-0.6.8-init.d b/net-wireless/hostapd/files/hostapd-0.6.8-init.d
index a207a625af60..924cc6145946 100644
--- a/net-wireless/hostapd/files/hostapd-0.6.8-init.d
+++ b/net-wireless/hostapd/files/hostapd-0.6.8-init.d
@@ -1,17 +1,17 @@
#!/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 $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-0.6.8-init.d,v 1.2 2009/05/17 10:18:18 gurligebis Exp $
opts="start stop reload"
depend() {
- local iface
-
+ local myneeds=
for iface in ${INTERFACES}; do
- need net.${iface}
+ myneeds="${myneeds} net.${iface}"
done
+ [ -n "${myneeds}" ] && need ${myneeds}
use logger
}
@@ -19,7 +19,7 @@ checkconfig() {
local file
for file in ${CONFIGS}; do
- if [[ ! -r ${file} ]]; then
+ if [ ! -r "${file}" ]; then
eerror "hostapd configuration file (${CONFIG}) not found"
return 1
fi
@@ -29,22 +29,22 @@ checkconfig() {
start() {
checkconfig || return 1
- ebegin "Starting hostapd"
+ ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/hostapd \
-- -B ${OPTIONS} ${CONFIGS}
- eend ${?}
+ eend $?
}
stop() {
- ebegin "Stopping hostapd"
+ ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec /usr/sbin/hostapd
- eend ${?}
+ eend $?
}
reload() {
checkconfig || return 1
- ebegin "Reloading hostapd configuration"
+ ebegin "Reloading ${SVCNAME} configuration"
kill -HUP $(pidof /usr/sbin/hostapd) > /dev/null 2>&1
- eend ${?}
+ eend $?
}
diff --git a/net-wireless/hostapd/files/hostapd-0.6.9-init.d b/net-wireless/hostapd/files/hostapd-0.6.9-init.d
index 37f79f5fc3c0..6d12c23303a4 100644
--- a/net-wireless/hostapd/files/hostapd-0.6.9-init.d
+++ b/net-wireless/hostapd/files/hostapd-0.6.9-init.d
@@ -1,17 +1,17 @@
#!/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.9-init.d,v 1.1 2009/03/24 23:23:30 gurligebis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-0.6.9-init.d,v 1.2 2009/05/17 10:18:18 gurligebis Exp $
opts="start stop reload"
depend() {
- local iface
-
+ local myneeds=
for iface in ${INTERFACES}; do
- need net.${iface}
+ myneeds="${myneeds} net.${iface}"
done
+ [ -n "${myneeds}" ] && need ${myneeds}
use logger
}
@@ -19,7 +19,7 @@ checkconfig() {
local file
for file in ${CONFIGS}; do
- if [[ ! -r ${file} ]]; then
+ if [ ! -r "${file}" ]; then
eerror "hostapd configuration file (${CONFIG}) not found"
return 1
fi
@@ -29,22 +29,22 @@ checkconfig() {
start() {
checkconfig || return 1
- ebegin "Starting hostapd"
+ ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/hostapd \
-- -B ${OPTIONS} ${CONFIGS}
- eend ${?}
+ eend $?
}
stop() {
- ebegin "Stopping hostapd"
+ ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec /usr/sbin/hostapd
- eend ${?}
+ eend $?
}
reload() {
checkconfig || return 1
- ebegin "Reloading hostapd configuration"
+ ebegin "Reloading ${SVCNAME} configuration"
kill -HUP $(pidof /usr/sbin/hostapd) > /dev/null 2>&1
- eend ${?}
+ eend $?
}