[pkg-squid-devel] Bug 520736

Amos Jeffries squid3 at treenet.co.nz
Tue Sep 8 12:32:01 UTC 2015


I've been looking at the old squid-2 bug
(<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520736>).

Attached is a proposed patch that greps the squid.conf settings for use
of pid_filename and causes it to be used instead of the init script
default PID file.

Anyone see any problems with doing this?

Amos
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 55d1ab6..8a7ac86 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+squid3 (3.5.7-2) UNRELEASED; urgency=medium
+
+  [ Amos Jeffries <amosjeffries at squid-cache.org> ]
+  * debian/squid.rc
+    - Grok pid_filename from squid.conf (Closes: #520736)
+
+ -- Amos Jeffries <amosjeffries at squid-cache.org>  Wed,  9 Sep 2015 00:16:00 +1200
+
 squid3 (3.5.7-1) unstable; urgency=medium
 
   [ Amos Jeffries <amosjeffries at squid-cache.org> ]
diff --git a/debian/squid.rc b/debian/squid.rc
index a5a8bb6..9c1f66f 100644
--- a/debian/squid.rc
+++ b/debian/squid.rc
@@ -129,6 +129,13 @@ stop () {
 	fi
 }
 
+cfg_pidfile=`grepconf pid_filename`
+if test "${cfg_pidfile:-none}" != "none" -a "$cfg_pidfile" != "$PIDFILE"
+then
+	log_warning_msg "squid.conf pid_filename overrides init script"
+	PIDFILE="$cfg_pidfile"
+fi
+
 case "$1" in
     start)
 	res=`$DAEMON -k parse -f $CONFIG 2>&1 | grep -o "FATAL .*"`


More information about the pkg-squid-devel mailing list