[SCM] Debian packaging for apache2 branch, next, updated. debian/2.4.4-2-11-g3770f98
Arno Töll
arno at debian.org
Sun May 12 15:55:45 UTC 2013
The following commit has been merged in the next branch:
commit 42a2c2f5478b94001a1783b1b078924b160fbdec
Author: Arno Töll <arno at debian.org>
Date: Sun May 12 15:19:43 2013 +0200
Wait until the server is started. Close 645460
diff --git a/debian/apache2.init b/debian/apache2.init
index 130c0f5..d91c7a2 100755
--- a/debian/apache2.init
+++ b/debian/apache2.init
@@ -76,6 +76,26 @@ PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE)
APACHE2_INIT_MESSAGE=""
+apache_wait_start() {
+ local STATUS=$1
+ local i=0
+ while : ; do
+ PIDTMP=$(pidofproc -p $PIDFILE $DAEMON)
+ if [ -n "${PIDTMP:-}" ] && kill -0 "${PIDTMP:-}" 2> /dev/null; then
+ return $STATUS
+ fi
+
+ if [ $i = "5" ] ; then
+ APACHE2_INIT_MESSAGE="The apache2$DIR_SUFFIX instance did not start within 5 seconds. Please read the log files to discover problems"
+ return 2
+ fi
+
+ [ "$VERBOSE" != no ] && log_progress_msg "."
+ sleep 1
+ i=$(($i+1))
+ done
+}
+
apache_wait_stop() {
local STATUS=$1
@@ -87,7 +107,7 @@ apache_wait_stop() {
break
STATUS=2
fi
- log_progress_msg "."
+ [ "$VERBOSE" != no ] && log_progress_msg "."
sleep 1
i=$(($i+1))
done
@@ -114,6 +134,7 @@ do_start()
if $APACHE2CTL configtest > /dev/null 2>&1; then
$APACHE2CTL start
+ apache_wait_start $?
return $?
else
APACHE2_INIT_MESSAGE="The apache2$DIR_SUFFIX configtest failed. Please run '$APACHE2CTL configtest' manually and read the log file to discover problems"
diff --git a/debian/changelog b/debian/changelog
index 74678db..3f0080b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,13 +13,15 @@ apache2 (2.4.4-3) UNRELEASED; urgency=low
(Closes: #707892)
* Properly return the conf/site configuration fragments enabled for Apache
when queried from a2query (Closes: #683212)
+ * Fix "/etc/init.d/apache2 start and restart need to wait until really
+ started" (Closes: #645460)
[ Stefan Fritsch ]
* Remove paragraph about MaxMemFree in README.Debian. The issue should be
fixed in 2.4.
* Enable mod_authn_core when upgrading from wheezy (Closes: #702866)
- -- Arno Töll <arno at debian.org> Sun, 12 May 2013 13:35:39 +0200
+ -- Arno Töll <arno at debian.org> Sun, 12 May 2013 15:17:07 +0200
apache2 (2.4.4-2) experimental; urgency=low
--
Debian packaging for apache2
More information about the Pkg-apache-commits
mailing list