[apache2] 02/02: more bin <-> sbin and cache_disk <-> disk_cache fixes

Stefan Fritsch sf at alioth.debian.org
Sun Sep 1 13:22:14 UTC 2013


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit 5f7587c87fd1fe3fc5c0572e0f60faadd4125921
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sun Sep 1 15:20:40 2013 +0200

    more bin <-> sbin and cache_disk <-> disk_cache fixes
---
 debian/apache2.cron.daily |    8 ++++----
 debian/apache2.init       |    8 ++++----
 debian/changelog          |    3 +++
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/debian/apache2.cron.daily b/debian/apache2.cron.daily
index cfd1fb9..d5f9cbc 100644
--- a/debian/apache2.cron.daily
+++ b/debian/apache2.cron.daily
@@ -5,7 +5,7 @@
 set -e
 set -u
 
-[ -e /usr/sbin/htcacheclean ] || exit 0
+type htcacheclean > /dev/null 2>&1 || exit 0
 [ -e /etc/default/apache2 ]   || exit 0
 
 
@@ -24,7 +24,7 @@ HTCACHECLEAN_OPTIONS=""
 ( [ "$HTCACHECLEAN_RUN" = "auto" ] && \
   [ -e /etc/apache2/mods-enabled/cache_disk.load ] )  || exit 0
 
-/usr/sbin/htcacheclean  ${HTCACHECLEAN_OPTIONS}	\
-			-p${HTCACHECLEAN_PATH}	\
-			-l${HTCACHECLEAN_SIZE}
+htcacheclean ${HTCACHECLEAN_OPTIONS}	\
+		-p${HTCACHECLEAN_PATH}	\
+		-l${HTCACHECLEAN_SIZE}
 
diff --git a/debian/apache2.init b/debian/apache2.init
index e0d918e..f5977ab 100755
--- a/debian/apache2.init
+++ b/debian/apache2.init
@@ -37,7 +37,7 @@ if [ -z "$APACHE_ENVVARS" ] ; then
 fi
 export APACHE_CONFDIR APACHE_ENVVARS
 
-ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin"
+ENV="env -i LANG=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then
 	ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR"
 fi
@@ -71,8 +71,8 @@ fi
 
 
 # Now, set defaults:
-APACHE2CTL="$ENV /usr/sbin/apache2ctl"
-HTCACHECLEAN="$ENV /usr/sbin/htcacheclean"
+APACHE2CTL="$ENV apache2ctl"
+HTCACHECLEAN="$ENV htcacheclean"
 PIDFILE=$(. $APACHE_ENVVARS && echo $APACHE_PID_FILE)
 APACHE2_INIT_MESSAGE=""
 
@@ -258,7 +258,7 @@ check_htcacheclean() {
 
 	MODSDIR=$(. $APACHE_ENVVARS && echo $APACHE_MODS_ENABLED)
 	        [ "$HTCACHECLEAN_RUN"  = "auto" \
-	                -a -e ${MODSDIR:-$APACHE_CONFDIR/mods-enabled}/disk_cache.load ] && \
+	                -a -e ${MODSDIR:-$APACHE_CONFDIR/mods-enabled}/cache_disk.load ] && \
 	                return 0
 	return 1
 }
diff --git a/debian/changelog b/debian/changelog
index 224931a..7e01dd9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 apache2 (2.4.6-4) UNRELEASED; urgency=low
 
+  * In logrotate and init script, don't hardcode path to htcacheclean.
+    Instead, put sbin directories in PATH. Also fix one missed reference
+    to disk_cache.load, missed in 2.4.6-3. Really closes: #718909
   * Remove possiblity to override path to apache2 executable via envvars.
     This is no longer necessary with MPMs as modules.
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list