Bug 463129 - Squid inist script test the wrong configfile
Squid inist script test the wrong configfile
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: squid (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jiri Skala
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-22 00:25 EDT by Martin Langhoff
Modified: 2014-11-09 17:31 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-07 06:00:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Langhoff 2008-09-22 00:25:21 EDT
Description of problem:

The init script allows /etc/sysconfig/squid to point to a different configfile and set other configuration parameters. However, the "sanity" check is run against the "standard" settings.

Version-Release number of selected component (if applicable):

squid-3.0.STABLE7-1.fc9.i386


How reproducible:

100%

Steps to Reproduce:
1. set /etc/sysconfig/squid to point to an alternative config file
2. bash -x /etc/init.d/squid start



The patch is trivial:

# diff -u /etc/init.d/squid{~,}
--- /etc/init.d/squid~	2008-07-02 05:32:13.000000000 -0400
+++ /etc/init.d/squid	2008-09-22 00:13:00.000000000 -0400
@@ -62,7 +62,7 @@
 start() {
 	probe
 
-	$SQUID -k parse
+	$SQUID -k parse $SQUID_OPTS
 	RETVAL=$?
 	if [ $RETVAL -ne 0 ]; then
 		echo -n $"Starting $prog: "
Comment 1 Henrik Nordström 2008-09-22 06:33:42 EDT
Changing the squid.conf path using SQUIDOPTS isn't supported by squid.init:
  - The squid.conf path is hardcoded in squid.init when checking for cache directories.
  - Several squid invocations from squid.init isn't using $SQUIDOPTS

SQUIDOPTS is only meant to be used for the simple command line flags such as -D, -F, -C, -s etc.. (i.e. most flags except for -z, -N, -h, -k or -f).

As I see it there is two viable options for resolving this:

a) Not supported

b) Change squid.init to use a $SQUIDCONF variable in addition to $SQUIDOPTS
Comment 2 Martin Langhoff 2008-09-22 19:40:19 EDT
From discussions with various Fedora/RH people at FudCon Boston and various email threads the general consensus seemed to be that init scripts for daemons are expected to support the /etc/sysconfig/$daemon file pointing to an alternative config file.

I am ok with having an explicit $SQUID_CONF variable, and re-reading the init script I see it would make sense for the status and probe commands too.
Comment 3 Jiri Skala 2008-10-07 06:00:55 EDT
There is new variable $SQUID_CONF that can be adjusted in the /etc/sysconfig/squid file.
Comment 4 Martin Langhoff 2008-10-13 21:41:24 EDT
Cool - is this going to make it to F9, F10 or F11?

A F9 update would be ideal to minimise custom stuff on the OLPC XS :-)
Comment 5 Jiri Skala 2008-10-14 01:38:16 EDT
(In reply to comment #4)
> Cool - is this going to make it to F9, F10 or F11?
> 
> A F9 update would be ideal to minimise custom stuff on the OLPC XS :-)

Yes, It will be implemented in rawhide too.
Comment 6 Jiri Skala 2008-10-14 01:48:49 EDT
(In reply to comment #4)
> Cool - is this going to make it to F9, F10 or F11?
> 
> A F9 update would be ideal to minimise custom stuff on the OLPC XS :-)

Sorry, I watched the code with sleeping eyes. I was convinced I did it in rawhide too and I see now this is right. This extension is really in the rawhide.

Note You need to log in before you can comment on or make changes to this bug.