Bug#911325: squid fails to start due to resolvconf hook code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#911325: squid fails to start due to resolvconf hook code

Wolfgang Schweer-2
Source: squid
Version: 4.3-1
Severity: normal
User: [hidden email]
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

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#911325: squid fails to start due to resolvconf hook code

Wolfgang Schweer-3
> 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"
 
Ping. Is there any chance getting the fix into Buster?
I figure it to be useful for others too.

Wolfgang

signature.asc (981 bytes) Download Attachment