* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2014-05-14 13:56 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2014-05-14 13:56 UTC (permalink / raw
To: gentoo-commits
commit: c0d81cf2642f16a9b2e3137d491d708b3b2eb6ef
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed May 14 13:55:37 2014 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed May 14 13:55:37 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/apache.git;a=commit;h=c0d81cf2
Attempt to fix stop of apache with mod_perl (bug #503986)
---
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index cf3936c..71d4e02 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -107,7 +107,7 @@ stop() {
${APACHE2} ${APACHE2_OPTS} -k stop
local i=0 retval=0
- while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
+ while ( test -f "${PIDFILE}" || pgrep -P ${PID} apache2 >/dev/null ) \
&& [ $i -lt ${TIMEOUT} ]; do
sleep 1 && i=$(expr $i + 1)
done
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: 9c6c5f0b52384dfe71ec3df833fbf7e9f3769663
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 13:08:49 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=9c6c5f0b
apache2.initd: capture config test output in checkconfig().
The configtest() command in the init script calls "apache2 -t" to test
the configuration for syntax errors. Before this commit, the command
was run twice -- once to see if there was an error, and once to output
the error to the user. We can capture the output in a variable the
first time; this commit does so, and prints the contents of that
variable when there is an error.
2.4/init/apache2.initd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index f86a31e..23d1746 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -61,11 +61,11 @@ checkconfig() {
checkpath --directory /run/apache_ssl_mutex
checkconfd || return 1
- ${APACHE2} ${APACHE2_OPTS} -t 1>/dev/null 2>&1
+ OUTPUT=$( ${APACHE2} ${APACHE2_OPTS} -t 2>&1 )
ret=$?
if [ $ret -ne 0 ]; then
eerror "${SVCNAME} has detected an error in your setup:"
- ${APACHE2} ${APACHE2_OPTS} -t
+ printf "%s\n" "${OUTPUT}"
fi
return $ret
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: 35d9a0af9ed1c4e9abe21fc9a2e47576ff6458a3
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 13:14:45 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=35d9a0af
apache2.initd: remove ancient baselayout-1.x check in checkconfd().
OpenRC went stable on 2011-06-28, and support for baselayout-1.x died
off after that. It's been ~4.5 years, so I think this check can go.
2.4/init/apache2.initd | 6 ------
1 file changed, 6 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 23d1746..88d9dd0 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -28,12 +28,6 @@ configtest() {
}
checkconfd() {
- if [ ! -f /etc/init.d/sysfs ]; then
- eerror "This init script works only with openrc (baselayout-2)."
- eerror "If you still need baselayout-1.x, please, use"
- eerror "apache2.initd-baselayout-1 from /usr/share/doc/apache2-*/"
- fi
-
PIDFILE="${PIDFILE:-/var/run/apache2.pid}"
TIMEOUT=${TIMEOUT:-15}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: 889c598ac4275caf37f2f9473f6947b4b4d7c0fe
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 15:25:46 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=889c598a
apache2.initd: set the path to the apache2 binary once, globally.
The $APACHE2 variable (containing the path to apache2) is currently
set every time checkconfd() is called. Its value never changes, and
the variable is already global, so we might as well set it once at the
beginning of the script.
2.4/init/apache2.initd | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 50b6500..c9d12c7 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -22,6 +22,9 @@ SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
+# The path to the apache2 binary.
+APACHE2="/usr/sbin/apache2"
+
depend() {
need net
use mysql dns logger netmount postgresql
@@ -44,7 +47,6 @@ checkconfd() {
APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
[ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
- APACHE2="/usr/sbin/apache2"
}
checkconfig() {
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: 58e1738cbfca1d381961423fcd34ae01074c4542
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 14:02:31 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=58e1738c
apache2.initd: update copyright year to 2016.
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 88d9dd0..f49245c 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
extra_commands="configtest modules virtualhosts"
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: 1a07d157d19dbd400d27946f89adb67c149ddf52
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 14:59:41 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=1a07d157
apache2.initd: remove config file readability check.
In checkconfd(), the apache2 init script checks to make sure that
$CONFIGFILE is readable. To do this, it needs to reimplement the
relative path handling that apache2 already does. If we remove the
relative path handling from checkconfd(), then apache2 continues to do
the right thing when $CONFIGFILE is relative. However, our custom
readability check fails, since it is looking for an absolute path
that doesn't exist.
Fortunately, apache2 already checks to ensure that the configuration
file exists and is readable. If we remove the custom readability check
entirely, then we get an error like,
* apache2 has detected an error in your setup:
apache2: Could not open configuration file
/usr/lib/apache2/example.conf: No such file or directory
This is not sufficiently worse than the custom error:
Unable to read configuration file: example.conf
Therefore the custom readability check is removed in this commit, and
we can avoid reimplementing the relative path handling as well.
2.4/init/apache2.initd | 5 -----
1 file changed, 5 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index f49245c..0a1e6a0 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -38,11 +38,6 @@ checkconfd() {
fi
CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
- [ "${CONFIGFILE#/}" = "${CONFIGFILE}" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}"
- if [ ! -r "${CONFIGFILE}" ]; then
- eerror "Unable to read configuration file: ${CONFIGFILE}"
- return 1
- fi
APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: d78bf0381f86d80fd06ca7f0818003afc09c26ec
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 15:16:40 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=d78bf038
apache2.initd: apply default values for conf.d variables in one place.
There are a few variables in the apache2 conf.d file that have default
values. The default values were applied at various places in different
commands, and often more than once. Since none of those variables need
to be modified after the script has loaded, it makes more sense to set
them once at the beginning of the script.
2.4/init/apache2.initd | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 0a1e6a0..50b6500 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -15,6 +15,13 @@ description_reload="Kills all children and reloads the configuration."
description_virtualhosts="Show the settings as parsed from the config file (currently only shows the virtualhost settings)."
description_stop="Kills all children and stops the server."
+# Apply default values for some conf.d variables.
+PIDFILE="${PIDFILE:-/var/run/apache2.pid}"
+TIMEOUT=${TIMEOUT:-15}
+SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
+CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
+RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
+
depend() {
need net
use mysql dns logger netmount postgresql
@@ -28,17 +35,11 @@ configtest() {
}
checkconfd() {
- PIDFILE="${PIDFILE:-/var/run/apache2.pid}"
- TIMEOUT=${TIMEOUT:-15}
-
- SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
if [ ! -d ${SERVERROOT} ]; then
eerror "SERVERROOT does not exist: ${SERVERROOT}"
return 1
fi
- CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
-
APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
[ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
@@ -106,8 +107,6 @@ stop() {
}
reload() {
- RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
-
checkconfig || return 1
if [ "${RELOAD_TYPE}" = "restart" ]; then
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: e2db37edd6987d81481688fa25c9f6c80d265734
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 15:30:11 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=e2db37ed
apache2.initd: do not call checkconfd() before stopping.
If we are attempting to stop (but not restart) apache2, then there is
no reason to check whether or not $SERVERROOT exists -- we should stop
apache2 either way. So remove that call to checkconfd().
2.4/init/apache2.initd | 2 --
1 file changed, 2 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index c9d12c7..e493f05 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -85,8 +85,6 @@ start() {
stop() {
if [ "${RC_CMD}" = "restart" ]; then
checkconfig || return 1
- else
- checkconfd || return 1
fi
PID=$(cat "${PIDFILE}" 2>/dev/null)
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: 57d7683f63ac1bd4d01e7bf5e6c159f28894d208
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 15:43:54 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=57d7683f
apache2.initd: replace deprecated name "runscript" with "openrc-run".
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index e81fa59..ed9fdc5 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: c8ea8dca5e71073426ad3766377cf950c9ef815b
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 15:40:33 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=c8ea8dca
apache2.initd: append SERVERROOT and CONFIGFILE to APACHE2_OPTS once.
We are currently appending both SERVERROOT and CONFIGFILE to
APACHE2_OPTS in the checkconfd() function. Since checkconfd() is
called multiple times, this can lead to duplication of command-line
arguments as witnessed in bug 566726. Since the values of SERVERROOT
and CONFIGFILE are fixed, we now instead append them once at the
beginning of the script.
Gentoo-Bug: 566726
2.4/init/apache2.initd | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 6320f1a..e81fa59 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -22,6 +22,11 @@ SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
+# Append the server root and configuration file parameters to the
+# user's APACHE2_OPTS.
+APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
+APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
+
# The path to the apache2 binary.
APACHE2="/usr/sbin/apache2"
@@ -42,9 +47,6 @@ checkconfd() {
eerror "SERVERROOT does not exist: ${SERVERROOT}"
return 1
fi
-
- APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
- APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
}
checkconfig() {
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: ea622d37dfafdcac22e4cfb75d19e26dae6f2e56
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 3 12:51:20 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:55:43 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=ea622d37
Whitespace fixes.
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
2.4/init/apache2.initd | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index de57251..d14aa39 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -69,8 +69,8 @@ start() {
checkconfig || return 1
if [ -n "${STARTUPERRORLOG}" ] ; then
- # We must make sure that we only append to APACHE2_OPTS
- # in start() and not in stop() or anywhere else that may
+ # We must make sure that we only append to APACHE2_OPTS
+ # in start() and not in stop() or anywhere else that may
# be executed along with start(), see bug #566726.
APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
fi
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: 4634757c03b8b257f809fade3311bd5b8e57af92
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 15:36:36 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=4634757c
apache2.initd: append STARTUPERRORLOG to APACHE2_OPTS in start().
We currently append the value of STARTUPERRORLOG to APACHE2_OPTS in
the checkconfd() function. This can cause duplication of command-line
arguments as witnessed in bug 566726. Since STARTUPERRORLOG does need
conditional handling (we don't append it if it's empty), the wisest
place to do so seems to be in start().
Gentoo-Bug: 566726
2.4/init/apache2.initd | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index e493f05..6320f1a 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -45,8 +45,6 @@ checkconfd() {
APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
- [ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
-
}
checkconfig() {
@@ -66,6 +64,13 @@ checkconfig() {
start() {
checkconfig || return 1
+ if [ -n "${STARTUPERRORLOG}" ] ; then
+ # We must make sure that we only append to APACHE2_OPTS
+ # in start() and not in stop() or anywhere else that may
+ # be executed along with start(), see bug #566726.
+ APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
+ fi
+
ebegin "Starting ${SVCNAME}"
# Use start stop daemon to apply system limits #347301
start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2016-03-03 13:03 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2016-03-03 13:03 UTC (permalink / raw
To: gentoo-commits
commit: c5b868a72f9bd9709fcc2bb603e2ef4b148603b5
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 15:49:17 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 12:46:26 2016 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=c5b868a7
apache2.initd: set defaults for LYNX and STATUSURL once.
The default values for the LYNX and STATUSURL variables were set in
functions. Now that the other conf.d defaults are set at the beginning
of the script, it makes sense to set these there, too. The LYNX
default was set twice, in configdump() and fullstatus(), so this
eliminates some duplication.
2.4/init/apache2.initd | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index ed9fdc5..de57251 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -20,6 +20,8 @@ PIDFILE="${PIDFILE:-/var/run/apache2.pid}"
TIMEOUT=${TIMEOUT:-15}
SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
CONFIGFILE="${CONFIGFILE:-/etc/apache2/httpd.conf}"
+LYNX="${LYNX:-lynx -dump}"
+STATUSURL="${STATUSURL:-http://localhost/server-status}"
RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
# Append the server root and configuration file parameters to the
@@ -149,9 +151,6 @@ modules() {
}
fullstatus() {
- LYNX="${LYNX:-lynx -dump}"
- STATUSURL="${STATUSURL:-http://localhost/server-status}"
-
if ! type -p $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then
eerror "lynx not found! you need to emerge www-client/lynx"
else
@@ -165,7 +164,6 @@ virtualhosts() {
}
configdump() {
- LYNX="${LYNX:-lynx -dump}"
INFOURL="${INFOURL:-http://localhost/server-info}"
checkconfd || return 1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2018-03-23 16:22 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2018-03-23 16:22 UTC (permalink / raw
To: gentoo-commits
commit: 6dae70de1fbf45713e2a4eb09d8624180bee2927
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 23 16:18:40 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar 23 16:20:29 2018 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=6dae70de
2.4/init/apache2.initd: Start after entropy daemon if available.
Gentoo-Bug: https://bugs.gentoo.org/470018
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index d14aa39..2e3bd7a 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -34,7 +34,7 @@ APACHE2="/usr/sbin/apache2"
depend() {
need net
- use mysql dns logger netmount postgresql
+ use dns entropy logger mysql netmount postgresql
after sshd
}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2020-12-01 12:19 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2020-12-01 12:19 UTC (permalink / raw
To: gentoo-commits
commit: db9bc13b034e1dcca1765dbf0e2a7efcc1b6d3ba
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 1 12:07:58 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Dec 1 12:12:40 2020 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=db9bc13b
2.4/init: Attempt to provide a way to no longer "need net" in depend
Code blatantly stolen from net-misc/openssh init script
Bug: https://bugs.gentoo.org/482092
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
2.4/init/apache2.initd | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index b0be24a..941dad9 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -33,9 +33,24 @@ APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
APACHE2="/usr/sbin/apache2"
depend() {
- need net
use dns entropy logger mysql netmount postgresql
after sshd
+ if ! echo ${rc_need} | grep -Fq "net." ; then
+ local x warn_addr
+ for x in $(virtualhosts | grep '^\(\[\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
+ case "${x}" in
+ \*:80|\*.443) ;;
+ *) warn_addr="${warn_addr} ${x}" ;;
+ esac
+ done
+ if [ -n "${warn_addr}" ] ; then
+ need net
+ ewarn "You are binding an interface in you virtual hosts."
+ ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/apache2"
+ ewarn "where FOO is the interface(s) providing the following address(es):"
+ ewarn "${warn_addr}"
+ fi
+ fi
}
configtest() {
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2020-12-01 12:35 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2020-12-01 12:35 UTC (permalink / raw
To: gentoo-commits
commit: c9904ab42f5d093c50a5b611de3a3b083e01eeb9
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 1 12:33:07 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Dec 1 12:33:07 2020 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=c9904ab4
2.4/init: Fix regexp for interface binding detection
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 941dad9..e834b44 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -37,7 +37,7 @@ depend() {
after sshd
if ! echo ${rc_need} | grep -Fq "net." ; then
local x warn_addr
- for x in $(virtualhosts | grep '^\(\[\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
+ for x in $(virtualhosts | grep '^\(\[\|\*:\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
case "${x}" in
\*:80|\*.443) ;;
*) warn_addr="${warn_addr} ${x}" ;;
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2020-12-02 11:43 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2020-12-02 11:43 UTC (permalink / raw
To: gentoo-commits
commit: ea133ba8e3fcd4b4153a5e34355a5f3196531c65
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 2 11:39:33 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Dec 2 11:39:33 2020 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=ea133ba8
2.4/init: Fixed typo in interface check
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index e834b44..6e5e292 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -39,7 +39,7 @@ depend() {
local x warn_addr
for x in $(virtualhosts | grep '^\(\[\|\*:\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
case "${x}" in
- \*:80|\*.443) ;;
+ \*:80|\*:443) ;;
*) warn_addr="${warn_addr} ${x}" ;;
esac
done
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2020-12-03 16:06 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2020-12-03 16:06 UTC (permalink / raw
To: gentoo-commits
commit: ab533766866142e385035dd3420b99b7ce23efc4
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 3 16:04:30 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Dec 3 16:04:30 2020 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=ab533766
2.4/init: Another small interface check tweak
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 6e5e292..77e9e36 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -37,7 +37,7 @@ depend() {
after sshd
if ! echo ${rc_need} | grep -Fq "net." ; then
local x warn_addr
- for x in $(virtualhosts | grep '^\(\[\|\*:\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
+ for x in $(virtualhosts 2>/dev/null | grep '^\(\[\|\*:\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
case "${x}" in
\*:80|\*:443) ;;
*) warn_addr="${warn_addr} ${x}" ;;
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2020-12-30 1:32 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2020-12-30 1:32 UTC (permalink / raw
To: gentoo-commits
commit: 348521816ac865188a12f03b059d5463fe1f441e
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 30 01:29:34 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Dec 30 01:29:34 2020 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=34852181
2.4/init: Submit pidfile to s-s-d on start to not confuse status
Reported-by: Hank Leininger <hlein <AT> korelogic.com>
Bug: https://bugs.gentoo.org/762481
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
2.4/init/apache2.initd | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 77e9e36..fc09ddd 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -92,7 +92,8 @@ start() {
ebegin "Starting ${SVCNAME}"
# Use start stop daemon to apply system limits #347301
- start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
+ start-stop-daemon --start --pidfile "${PIDFILE}" -- \
+ ${APACHE2} ${APACHE2_OPTS} -k start
local i=0 retval=1
while [ $i -lt ${TIMEOUT} ] ; do
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2020-12-30 1:46 Lars Wendler
0 siblings, 0 replies; 22+ messages in thread
From: Lars Wendler @ 2020-12-30 1:46 UTC (permalink / raw
To: gentoo-commits
commit: de835af4552c2028a938b86b37054610b44a4555
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 30 01:44:41 2020 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Dec 30 01:44:41 2020 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=de835af4
2.4/init: Add a comment about altered pidfile in confd file
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
2.4/init/apache2.confd | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/2.4/init/apache2.confd b/2.4/init/apache2.confd
index 4635201..e6bb6c2 100644
--- a/2.4/init/apache2.confd
+++ b/2.4/init/apache2.confd
@@ -41,7 +41,9 @@ APACHE2_OPTS="-D DEFAULT_VHOST -D LANGUAGE -D INFO"
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.
-# PID file
+# PID file.
+# You need to set "PidFile" in httpd.conf as well if you change this from the
+# default (which is /var/run/apache2.pid)
#PIDFILE=/var/run/apache2.pid
# timeout for startup/shutdown checks
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2023-09-03 7:40 Hans de Graaff
0 siblings, 0 replies; 22+ messages in thread
From: Hans de Graaff @ 2023-09-03 7:40 UTC (permalink / raw
To: gentoo-commits
commit: f57b703d2da4f9419b42795e01c748c6e6015bc5
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 3 07:34:35 2023 +0000
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Sep 3 07:34:35 2023 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=f57b703d
Fix interface binding check in init.d file
Fix two issues with the interface binding check:
1) don't special case ports 80 and 443 since the interface requirement
also applies to all other ports.
2) on show the warning for non-generic binds (i.e. binding a specific
IP address) since that requires the associated interface to be up
first.
Bug: https://bugs.gentoo.org/913227
Bug: https://github.com/gentoo/gentoo/pull/32529
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
2.4/init/apache2.initd | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 0058e20..1691007 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -36,13 +36,8 @@ depend() {
use dns entropy logger mysql netmount postgresql
after sshd
if ! echo ${rc_need} | grep -Fq "net." ; then
- local x warn_addr
- for x in $(virtualhosts 2>/dev/null | grep '^\(\[\|\*:\|\)[[:digit:]]' | sed 's@\(:[[:digit:]]\{1,5\}\)\([[:space:]].*\|$\)@\1@' | sort -u) ; do
- case "${x}" in
- \*:80|\*:443) ;;
- *) warn_addr="${warn_addr} ${x}" ;;
- esac
- done
+ local warn_addr
+ warn_addr="$(virtualhosts 2>/dev/null | sed -nre 's/^([^ *]+:[0-9]+)[[:space:]].*/\1/p' | tr '\n' ' ')"
if [ -n "${warn_addr}" ] ; then
need net
ewarn "You are binding an interface in you virtual hosts."
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] proj/apache:master commit in: 2.4/init/
@ 2024-02-23 10:19 Hans de Graaff
0 siblings, 0 replies; 22+ messages in thread
From: Hans de Graaff @ 2024-02-23 10:19 UTC (permalink / raw
To: gentoo-commits
commit: f994c07041c37e17b4c8559a0dc657055de1e146
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 23 10:17:45 2024 +0000
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Fri Feb 23 10:17:45 2024 +0000
URL: https://gitweb.gentoo.org/proj/apache.git/commit/?id=f994c070
Fix typo
https://bugs.gentoo.org/925310
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
2.4/init/apache2.initd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/2.4/init/apache2.initd b/2.4/init/apache2.initd
index 1691007..2956fcc 100755
--- a/2.4/init/apache2.initd
+++ b/2.4/init/apache2.initd
@@ -40,7 +40,7 @@ depend() {
warn_addr="$(virtualhosts 2>/dev/null | sed -nre 's/^([^ *]+:[0-9]+)[[:space:]].*/\1/p' | tr '\n' ' ')"
if [ -n "${warn_addr}" ] ; then
need net
- ewarn "You are binding an interface in you virtual hosts."
+ ewarn "You are binding an interface in your virtual hosts."
ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/apache2"
ewarn "where FOO is the interface(s) providing the following address(es):"
ewarn "${warn_addr}"
^ permalink raw reply related [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-02-23 10:19 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 13:03 [gentoo-commits] proj/apache:master commit in: 2.4/init/ Lars Wendler
-- strict thread matches above, loose matches on Subject: below --
2024-02-23 10:19 Hans de Graaff
2023-09-03 7:40 Hans de Graaff
2020-12-30 1:46 Lars Wendler
2020-12-30 1:32 Lars Wendler
2020-12-03 16:06 Lars Wendler
2020-12-02 11:43 Lars Wendler
2020-12-01 12:35 Lars Wendler
2020-12-01 12:19 Lars Wendler
2018-03-23 16:22 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2016-03-03 13:03 Lars Wendler
2014-05-14 13:56 Lars Wendler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox