Bug 11815 - Small fix for squid startup script.
Small fix for squid startup script.
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: squid (Show other bugs)
6.2
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-06-01 02:25 EDT by Andy Jones
Modified: 2014-03-16 22:14 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-06-01 02:25:04 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 Andy Jones 2000-06-01 02:25:03 EDT
In /etc/rc.d/init.d/squid, lines 34-38 say

# determine which one is the cache_swap directory
CACHE_SWAP=`sed -e ''s/#.*//g'' /etc/squid/squid.conf | '\
        grep cache_dir | sed -e ''s/cache_dir//'' | '\
        cut -d '' '' -f 2`
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/spool/squid


By default, the grep fails because the cache dir line in the
/etc/squid/squid.conf  file is commented out.   Namely:

#cache_dir ufs /var/spool/squid 100 16 256

If a  cache_dir  line is added which contains extra blank space around the
"ufs" or directory field, then the   cut  will select the blank space and
so CACHE_SWAP will be empty and then erroneously re-set to 
/var/spool/squid.

(I know because this happened to me)

My suggestion is to change the  cut  command to   awk ''{ print $2 }''
which unlike cut is tolerant of multiple blank spaces.  

/'\ndy
Comment 1 Bill Nottingham 2000-06-10 18:59:56 EDT
This should already be fixed in the squid package currently in rawhide.

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