Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 28940 | Differences between
and this patch

Collapse All | Expand All

(-)xinetd (-5 / +26 lines)
Lines 5-24 Link Here
5
5
6
opts="start stop reload restart dump check"
6
opts="start stop reload restart dump check"
7
7
8
DAEMONTOOLSDIR="/var/daemontools/xinetd"
9
8
depend() {
10
depend() {
9
	need net
11
	need net
10
}
12
}
11
13
12
start() {
14
start() {
13
	ebegin "Starting xinetd"
15
	if [ -x /usr/bin/svc ] && [ -x "${DAEMONTOOLSDIR}/run" ] \
14
	start-stop-daemon --start --quiet --exec /usr/sbin/xinetd \
16
		&& [ ! -f "${DAEMONTOOLSDIR}/noinit" ]
15
		-- -pidfile /var/run/xinetd.pid ${XINETD_OPTS}
17
	then
16
	eend $? 
18
		ebegin "Starting supervised xinetd"
19
		/usr/bin/pgrphack /usr/bin/supervise "$DAEMONTOOLSDIR" &
20
	else
21
		ebegin "Starting xinetd"
22
		start-stop-daemon --start --quiet --exec /usr/sbin/xinetd \
23
			-- -pidfile /var/run/xinetd.pid ${XINETD_OPTS}
24
	fi
25
	eend $?
17
}
26
}
18
27
19
stop() {
28
stop() {
20
	ebegin "Stopping xinetd"
29
	ebegin "Stopping xinetd"
21
	start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid
30
	if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR"
31
	then
32
		/usr/bin/svc -dx "$DAEMONTOOLSDIR"
33
	else
34
		start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid
35
	fi
22
	eend $?
36
	eend $?
23
}
37
}
24
38
Lines 39-41 Link Here
39
	killall -IOT xinetd &>/dev/null
53
	killall -IOT xinetd &>/dev/null
40
	eend $?
54
	eend $?
41
}
55
}
56
57
status() {
58
	if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR"
59
	then
60
		einfo `/usr/bin/svstat "$DAEMONTOOLSDIR"`
61
	fi
62
}

Return to bug 28940