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: Fri, 22 Nov 2013 08:45:32
Message-Id: 20131122084523.3D4F62004E@flycatcher.gentoo.org
1 polynomial-c 13/11/22 08:45:23
2
3 Modified: gentoo-apache-2.2.23-initd_fixups.patch
4 Log:
5 Fixed startup of apache when pidfile exists (bug #492222)
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
8
9 Revision Changes Path
10 1.2 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.2&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.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/apache/files/gentoo-apache-2.2.23-initd_fixups.patch?r1=1.1&r2=1.2
15
16 Index: gentoo-apache-2.2.23-initd_fixups.patch
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-servers/apache/files/gentoo-apache-2.2.23-initd_fixups.patch,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- gentoo-apache-2.2.23-initd_fixups.patch 7 Nov 2013 14:56:34 -0000 1.1
23 +++ gentoo-apache-2.2.23-initd_fixups.patch 22 Nov 2013 08:45:23 -0000 1.2
24 @@ -1,18 +1,18 @@
25 -Make the init script recognize failed start and stop more reliably.
26 -
27 -2013-11-07 - Lars Wendler <polynomial-c@g.o>
28 -
29 --- gentoo-apache-2.2.23/init/apache2.initd
30 +++ gentoo-apache-2.2.23/init/apache2.initd
31 -@@ -77,12 +77,13 @@
32 +@@ -77,12 +77,16 @@
33 # Use start stop daemon to apply system limits #347301
34 start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
35
36 - i=0
37 +- while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
38 + local i=0 retval=1
39 - while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
40 ++ while [ $i -lt ${TIMEOUT} ] ; do
41 ++ if [ -e "${PIDFILE}" ] ; then
42 ++ retval=0
43 ++ break
44 ++ fi
45 sleep 1 && i=$(expr $i + 1)
46 -+ [ -e "${PIDFILE}" ] && retval=0
47 done
48
49 - eend $(test $i -lt ${TIMEOUT})
50 @@ -20,7 +20,7 @@
51 }
52
53 stop() {
54 -@@ -101,13 +102,14 @@
55 +@@ -101,13 +105,14 @@
56 ebegin "Stopping ${SVCNAME}"
57 ${APACHE2} ${APACHE2_OPTS} -k stop