From 4de9f82d82c23c63248e43614dc34a5fd77fe7c5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 21 Jan 2016 10:25:46 -0500 Subject: [PATCH 06/11] 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() { -- 2.4.10