Re:Bug 1202858 – Restarting squid results in deleting all fi...
by rachelbythebay on Tuesday March 24, 2015 @02:18AM
(#9255124)
squid-3.1.10-29.el6.src.rpm (from ftp.redhat.com, buried where they keep SRPMs) has squid.init within, and that file has no mention of SQUID_PIDFILE_DIR. A few other spot-checked versions are the same way.
https://github.com/mozilla-services/squid-rpm/blob/master/SO... ... however ... whatever that is, does.
Did they take this upstream init script somehow?
Re:Bug 1202858 – Restarting squid results in deleting all fi...
by ato on Tuesday March 24, 2015 @02:53AM
(#9255198)
This looks like it:
https://bugzilla.redhat.com/show_bug.cgi?id=1102343
I guess they applied that change which was obviously written against a very different init script where the variable is actually defined, got QA to test it and immediately backed it out.
Re:Bug 1202858 – Restarting squid results in deleting all fi...
by thaumaturgy on Tuesday March 24, 2015 @03:00AM
(#9255214)
Oh, good call. Yeah, you found it.
Re:Bug 1202858 – Restarting squid results in deleting all fi...
by thaumaturgy on Tuesday March 24, 2015 @02:56AM
(#9255204)
That would be my guess too, although the package maintainer confirmed it on (presumably) a fresh install. I can't find a candidate rm command anywhere in the SRPM, so maybe an upstream file got merged into distrib somehow? I don't have access to an RHEL system to try it out, and can't find the distrib RPM yet to check.
In stop():
and in restart(): SQUID_PIDFILE_DIR is hardcoded to "/var/run/squid" at the top of my copy of the init script. But, neither of those rm commands check first to make sure that SQUID_PIDFILE_DIR isn't empty (or, better yet, is in /var and doesn't contain ".."), and either the submitter's copy of the script is mangled or something else somewhere is stomping on SQUID_PIDFILE_DIR in the shell environment....I should grep my init scripts for "rm".