[Bug 247247] www/squid: fails to start when dir for pidfile does not exist (e.g. /var/run is a tmpfs)
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jun 14 08:06:04 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247247
Bug ID: 247247
Summary: www/squid: fails to start when dir for pidfile does
not exist (e.g. /var/run is a tmpfs)
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs at FreeBSD.org
Reporter: t.eichstaedt at gmx.net
CC: timp87 at gmail.com
CC: timp87 at gmail.com
Flags: maintainer-feedback?(timp87 at gmail.com)
Created attachment 215535
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=215535&action=edit
patch for squid's service script
System: FreeBSD 12.1-RELEASE-p6
squid: 4.10 from pkg (not built myself)
fstab: none /var/run tmpfs rw,size=2M,noexec,gid=0,uid=0 0 0
Hello Tim!
By default, squid's pidfile is /var/run/squid/squid.pid.
The dir /var/run/squid gets neither checked nor created by the service script
/etc/rc.d/squid.
Many users will create that directory when they run into that bug (and not
report it), but that fixes it only if /var/run resides on stable storage -- in
contrast, a common recommendation is a tmpfs like given above, and this implies
it is empty after every reboot. Thus, the service script should check and
create that dir, if neccessary.
My suggestions for appropiate defaults are:
pidfile=/var/run/squid.pid (why does squid need it's own directory? worker
threads?)
chdir=/var/cache/squid
The admin might have special ZFS parameters set for caches (e.g. relaxed
metadata redundancy, no snapshots).
2nd many would agree to keep /usr and /var narrow.
Remember 30 years ago, when each and every tarball installed itself into
/usr/gprolog, /usr/X11, /usr/squid,... nobody likes that nowadays.
Appended is the patch to my fixed service script; it is by no means perfect,
but you may want to copy&paste some parts. I removed comments where the
information they give is brilliantly clear (on 1st sight, even for beginners)
from the code.
The patch was produced with 'diff -U 7 etc/rc.d/squid{.orig,}' from /usr/local.
With kind regards, Torsten
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list