Source: squid
Version: 4.3-1
Severity: normal
User: debian-...@lists.debian.org
Usertags: debian-edu

Dear Squid maintainer(s),

while testing Debian Edu buster, I noticed that squid failed to start. 
Debian Edu uses resolvconf and separate partions for /var and 
/var/spool/squid; so squid should avoid to be reloaded until squid.pid 
is available.

Due to the resolvconf hook this isn't the case (only /usr is 
considered).

Thanks to <ansgar> and <mbiebl> on #debian-systemd I got squid working 
with this change:

diff --git a/debian/squid.resolvconf b/debian/squid.resolvconf
index d7676d0c..1cc0555a 100644
--- a/debian/squid.resolvconf
+++ b/debian/squid.resolvconf
@@ -3,7 +3,7 @@
 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
 
 # Make squid aware of changes to resolv.conf
-# Avoid reload before /usr is mounted
-if [ -d /usr/sbin ] ; then
-   invoke-rc.d squid reload || true
+# Avoid reload before squid.pid is available
+if  [ -d /run/systemd/system ] && systemctl -q is-active squid || [ -f 
/var/run/squid.pid ] ; then
+   invoke-rc.d squid reload
 fi

The fix has been proposed by Michael Biebl with this comment added:
"this relies on squid.service using Type=forking and squid writing a pid 
file. Should this ever change, the hook script would need to be updated"

Please check.

Wolfgang

Attachment: signature.asc
Description: PGP signature

Reply via email to