Bug 463129 - Squid inist script test the wrong configfile
Summary: Squid inist script test the wrong configfile
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: squid
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jiri Skala
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-22 04:25 UTC by Martin Langhoff
Modified: 2014-11-09 22:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-07 10:00:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Martin Langhoff 2008-09-22 04:25:21 UTC
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 10:33:42 UTC
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 23:40:19 UTC
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 10:00:55 UTC
There is new variable $SQUID_CONF that can be adjusted in the /etc/sysconfig/squid file.

Comment 4 Martin Langhoff 2008-10-14 01:41:24 UTC
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 05:38:16 UTC
(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 05:48:49 UTC
(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.