Bug 16722

Summary: squid boot script error
Product: [Retired] Red Hat Linux Reporter: Need Real Name <g.armanino>
Component: squid-configAssignee: Florian La Roche <laroche>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: g.armanino
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-08-22 14:08:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2000-08-22 14:07:59 UTC
In squid-2.3.STABLE1-5 there is a little bug in the boot script,
installed as /etc/rc.d/init.d/squid, at line 37.

In particular,

[...]
# 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//' | \
        # wrong! # cut -d ' ' -f 2`
        cut -d ' ' -f 3` # ok! # 
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/spool/squid

# default squid options
# -D disables initial dns checks. If you most likely will not to have an
#    internet connection when you start squid, uncomment this
SQUID_OPTS="-D"

RETVAL=0
case "$1" in
start)
    echo -n "Starting $SQUID: "
    for adir in $CACHE_SWAP; do
        if [ ! -d $adir/00 ]; then
             echo -n "init_cache_dir $adir... "
             $SQUID -z -F 2>/dev/null
        fi
    done
[...]

with squid 2.3 the type (i.e. ufs) is mandatory in the cache_dir
directive, and $adir in your script has a wrong value, so that
cache_dir is re-inizialized at every boot.

regards,
	giovanni armanino

Comment 1 Bill Nottingham 2000-08-22 15:56:56 UTC
Yup, this has been fixed as of Pinstripe.