Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 269063
Collapse All | Expand All

(-)a/hostapd-0.6.9-init.d (-10 / +10 lines)
Lines 6-17 Link Here
6
opts="start stop reload"
6
opts="start stop reload"
7
7
8
depend() {
8
depend() {
9
	local iface
9
	local myneeds=
10
11
	for iface in ${INTERFACES}; do
10
	for iface in ${INTERFACES}; do
12
		need net.${iface}
11
		myneeds="${myneeds} net.${iface}"
13
	done
12
	done
14
13
14
	[ -n "${myneeds}" ] && need ${myneeds}
15
	use logger
15
	use logger
16
}
16
}
17
17
Lines 19-25 Link Here
19
	local file
19
	local file
20
20
21
	for file in ${CONFIGS}; do
21
	for file in ${CONFIGS}; do
22
		if [[ ! -r ${file} ]]; then
22
		if [ ! -r "${file}" ]; then
23
			eerror "hostapd configuration file (${CONFIG}) not found"
23
			eerror "hostapd configuration file (${CONFIG}) not found"
24
			return 1
24
			return 1
25
		fi
25
		fi
Lines 29-50 Link Here
29
start() {
29
start() {
30
	checkconfig || return 1
30
	checkconfig || return 1
31
31
32
	ebegin "Starting hostapd"
32
	ebegin "Starting ${SVCNAME}"
33
	start-stop-daemon --start --exec /usr/sbin/hostapd \
33
	start-stop-daemon --start --exec /usr/sbin/hostapd \
34
		-- -B ${OPTIONS} ${CONFIGS}
34
		-- -B ${OPTIONS} ${CONFIGS}
35
	eend ${?}
35
	eend $?
36
}
36
}
37
37
38
stop() {
38
stop() {
39
	ebegin "Stopping hostapd"
39
	ebegin "Stopping ${SVCNAME}"
40
	start-stop-daemon --stop --exec /usr/sbin/hostapd
40
	start-stop-daemon --stop --exec /usr/sbin/hostapd
41
	eend ${?}
41
	eend $?
42
}
42
}
43
43
44
reload() {
44
reload() {
45
	checkconfig || return 1
45
	checkconfig || return 1
46
46
47
	ebegin "Reloading hostapd configuration"
47
	ebegin "Reloading ${SVCNAME} configuration"
48
	kill -HUP $(pidof /usr/sbin/hostapd) > /dev/null 2>&1
48
	kill -HUP $(pidof /usr/sbin/hostapd) > /dev/null 2>&1
49
	eend ${?}
49
	eend $?
50
}
50
}

Return to bug 269063