Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/apache/files: gentoo-apache-2.2.23-initd_fixups.patch
Date: Thu, 07 Nov 2013 14:56:40
Message-Id: 20131107145634.F413F2004B@flycatcher.gentoo.org
1 polynomial-c 13/11/07 14:56:34
2
3 Added: gentoo-apache-2.2.23-initd_fixups.patch
4 Log:
5 Fixed problems with init script. Removed some older ebuilds
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
8
9 Revision Changes Path
10 1.1 www-servers/apache/files/gentoo-apache-2.2.23-initd_fixups.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/apache/files/gentoo-apache-2.2.23-initd_fixups.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/apache/files/gentoo-apache-2.2.23-initd_fixups.patch?rev=1.1&content-type=text/plain
14
15 Index: gentoo-apache-2.2.23-initd_fixups.patch
16 ===================================================================
17 Make the init script recognize failed start and stop more reliably.
18
19 2013-11-07 - Lars Wendler <polynomial-c@g.o>
20
21 --- gentoo-apache-2.2.23/init/apache2.initd
22 +++ gentoo-apache-2.2.23/init/apache2.initd
23 @@ -77,12 +77,13 @@
24 # Use start stop daemon to apply system limits #347301
25 start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
26
27 - i=0
28 + local i=0 retval=1
29 while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
30 sleep 1 && i=$(expr $i + 1)
31 + [ -e "${PIDFILE}" ] && retval=0
32 done
33
34 - eend $(test $i -lt ${TIMEOUT})
35 + eend ${retval}
36 }
37
38 stop() {
39 @@ -101,13 +102,14 @@
40 ebegin "Stopping ${SVCNAME}"
41 ${APACHE2} ${APACHE2_OPTS} -k stop
42
43 - i=0
44 - while ( ! test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
45 + local i=0 retval=0
46 + while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
47 && [ $i -lt ${TIMEOUT} ]; do
48 sleep 1 && i=$(expr $i + 1)
49 done
50 + [ -e "${PIDFILE}" ] && retval=1
51
52 - eend $(test $i -lt ${TIMEOUT})
53 + eend ${retval}
54 }
55
56 reload() {