diff options
author | Alin Năstac <mrness@gentoo.org> | 2006-01-18 21:39:10 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2006-01-18 21:39:10 +0000 |
commit | e70c8f43150f08b984fb232ccc92b1345b5fe916 (patch) | |
tree | af0525808984307f94a72196fd3901d0f744cecc /net-proxy/squid | |
parent | Stable on ppc64; bug #118832 (diff) | |
download | historical-e70c8f43150f08b984fb232ccc92b1345b5fe916.tar.gz historical-e70c8f43150f08b984fb232ccc92b1345b5fe916.tar.bz2 historical-e70c8f43150f08b984fb232ccc92b1345b5fe916.zip |
Display squid output on failure to initialize cache directories (#119215).
Package-Manager: portage-2.0.53
Diffstat (limited to 'net-proxy/squid')
-rw-r--r-- | net-proxy/squid/ChangeLog | 6 | ||||
-rw-r--r-- | net-proxy/squid/Manifest | 14 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.initd | 124 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.initd-logrotate | 116 |
4 files changed, 132 insertions, 128 deletions
diff --git a/net-proxy/squid/ChangeLog b/net-proxy/squid/ChangeLog index 54b1d924b039..ffc5a95b8840 100644 --- a/net-proxy/squid/ChangeLog +++ b/net-proxy/squid/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-proxy/squid # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/ChangeLog,v 1.60 2006/01/09 11:51:47 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/ChangeLog,v 1.61 2006/01/18 21:39:10 mrness Exp $ + + 18 Jan 2006; Alin Nastac <mrness@gentoo.org> files/squid.initd, + files/squid.initd-logrotate: + Display squid output on failure to initialize cache directories (#119215). 09 Jan 2006; Alin Nastac <mrness@gentoo.org> files/squid.initd, files/squid.pam, -files/squid.pam-include, +files/squid.initd-logrotate, diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest index 773437610707..6dfd894315de 100644 --- a/net-proxy/squid/Manifest +++ b/net-proxy/squid/Manifest @@ -1,22 +1,22 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 d3a651180ad99bc7865e0231ca54ec21 ChangeLog 24705 +MD5 d89745a584c053f1ba91b7896f7ea29e ChangeLog 24880 MD5 9aae33d4872e127be17e8a1bc587c2a7 files/digest-squid-2.5.11 157 MD5 3e02deef24558936110d58663433ace3 files/digest-squid-2.5.12 157 MD5 8e7207b10699502e573d9d60ff0e07a6 files/squid.confd 437 MD5 6f30a7f5c48ec35a7044acb189c858c5 files/squid.cron 133 -MD5 33e02a9bf2162ee1f2910684916bb19a files/squid.initd 2642 -MD5 b913d146f7966abe8392138accc29e69 files/squid.initd-logrotate 2508 +MD5 f91520f6bd2349693b19dece78738656 files/squid.initd 2015 +MD5 23ed046941cb476e7b12081220223664 files/squid.initd-logrotate 1909 MD5 5286e7e73ca5687381fa09ff41dccbd1 files/squid.logrotate 101 MD5 2957ca0ec8bf84e4af8ed5adef7acb90 files/squid.pam 315 MD5 cf398556bce540358644ce9a452abfba metadata.xml 241 MD5 e134f5c38aadc2fd333ac8b006dbc252 squid-2.5.11.ebuild 6389 MD5 31e9c5b0a022091d02569297aec7e5e4 squid-2.5.12.ebuild 6414 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.1 (GNU/Linux) +Version: GnuPG v1.4.2 (GNU/Linux) -iD8DBQFDwk5hjG8pv1lIUX4RAnfWAJ9UL2lPC1wMw7ecdOBoyloRIltgygCguY+T -W2Zl8oBxkKrU9VbsSSf8Aw4= -=+MyL +iD8DBQFDzrWQjG8pv1lIUX4RAnZgAJ9c0m99BdzhMtSeBsuHFiBgXcRdeACaA3mP +h04/fTjbTYA8A9KcEiEmeTY= +=K8X4 -----END PGP SIGNATURE----- diff --git a/net-proxy/squid/files/squid.initd b/net-proxy/squid/files/squid.initd index 01f4b06c9677..82597c89b8e9 100644 --- a/net-proxy/squid/files/squid.initd +++ b/net-proxy/squid/files/squid.initd @@ -1,89 +1,89 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/files/squid.initd,v 1.3 2006/01/09 11:51:47 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/files/squid.initd,v 1.4 2006/01/18 21:39:10 mrness Exp $ opts="${opts} reload rotate" depend() { - need net + need net } # Try to increase the # of filedescriptors we can open. maxfds() { - [ -n "$SQUID_MAXFD" ] || return - [ -f /proc/sys/fs/file-max ] || return 0 - [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192 - global_file_max=`cat /proc/sys/fs/file-max` - minimal_file_max=$(($SQUID_MAXFD + 4096)) - if [ "$global_file_max" -lt $minimal_file_max ] - then - echo $minimal_file_max > /proc/sys/fs/file-max - fi - ulimit -n $SQUID_MAXFD + [ -n "$SQUID_MAXFD" ] || return + [ -f /proc/sys/fs/file-max ] || return 0 + [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192 + local global_file_max=`cat /proc/sys/fs/file-max` + local minimal_file_max=$(($SQUID_MAXFD + 4096)) + if [ "$global_file_max" -lt $minimal_file_max ]; then + echo $minimal_file_max > /proc/sys/fs/file-max + fi + ulimit -n $SQUID_MAXFD } checkconfig() { - maxfds - CACHE_SWAP=`sed -e 's/#.*//g' /etc/squid/squid.conf | \ - grep cache_dir | awk '{ print $3 }'` - [ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/cache/squid - umask 027 - for x in $CACHE_SWAP ; do - if [ ! -d $x/00 ] ; then - einfo "Initializing cache directory: $x" - cd $x - /usr/sbin/squid -z -F 2>/dev/null - if [ $? -ne 0 ] ; then - eerror "Error initializing: $x" - return 1 - fi - fi - done + maxfds + local CACHE_SWAP=`awk '/^[ \t]*cache_dir[ \t]+/ { printf "%s ", $3 ; }' < /etc/squid/squid.conf` + [ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/cache/squid + umask 027 + for x in $CACHE_SWAP ; do + if [ ! -d $x/00 ] ; then + ebegin "Initializing cache directories" + local INIT_CACHE_RESPONSE=`/usr/sbin/squid -z -N -D 2>&1` + if [ $? != 0 ] || [ "$INIT_CACHE_RESPONSE" != "${INIT_CACHE_RESPONSE/erminated abnormally}" ]; then + eend 1 + echo "$INIT_CACHE_RESPONSE" + return 1 + fi + eend 0 + break + fi + done + return 0 } start() { - checkconfig || return 1 - ebegin "Starting squid" - /usr/sbin/squid ${SQUID_OPTS} - eend $? && sleep 1 + checkconfig || return 1 + ebegin "Starting squid" + /usr/sbin/squid ${SQUID_OPTS} + eend $? && sleep 1 } stop() { - ebegin "Stopping squid" - /usr/sbin/squid -k shutdown - # Now we have to wait until squid has _really_ stopped. - sleep 1 - if [ -f /var/run/squid.pid ] ; then - einfon "Waiting ." - cnt=0 - while [ -f /var/run/squid.pid ] ; do - cnt=`expr $cnt + 1` - if [ $cnt -gt 60 ] ; then - # Waited 120 seconds now. Fail. - eend 1 "Failed." - break - fi - sleep 2 - echo -n "." - done - echo -n "done." - eend 0 - else - eend 0 - fi + ebegin "Stopping squid" + /usr/sbin/squid -k shutdown + # Now we have to wait until squid has _really_ stopped. + sleep 1 + if [ -f /var/run/squid.pid ] ; then + einfon "Waiting ." + cnt=0 + while [ -f /var/run/squid.pid ] ; do + cnt=`expr $cnt + 1` + if [ $cnt -gt 60 ] ; then + # Waited 120 seconds now. Fail. + eend 1 "Failed." + break + fi + sleep 2 + echo -n "." + done + eend 0 + else + eend 0 + fi } reload() { - checkconfig || return 1 - ebegin "Reloading squid" - /usr/sbin/squid -k reconfigure - eend $? + checkconfig || return 1 + ebegin "Reloading squid" + /usr/sbin/squid -k reconfigure + eend $? } rotate() { - service_started squid || return 1 - ebegin "Rotating logs" - /usr/sbin/squid -k rotate - eend $? + service_started squid || return 1 + ebegin "Rotating logs" + /usr/sbin/squid -k rotate + eend $? } diff --git a/net-proxy/squid/files/squid.initd-logrotate b/net-proxy/squid/files/squid.initd-logrotate index b43bd3dcf069..cf06aab7aa54 100644 --- a/net-proxy/squid/files/squid.initd-logrotate +++ b/net-proxy/squid/files/squid.initd-logrotate @@ -1,82 +1,82 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/files/squid.initd-logrotate,v 1.1 2006/01/09 11:51:47 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/files/squid.initd-logrotate,v 1.2 2006/01/18 21:39:10 mrness Exp $ opts="${opts} reload" depend() { - need net + need net } # Try to increase the # of filedescriptors we can open. maxfds() { - [ -n "$SQUID_MAXFD" ] || return - [ -f /proc/sys/fs/file-max ] || return 0 - [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192 - global_file_max=`cat /proc/sys/fs/file-max` - minimal_file_max=$(($SQUID_MAXFD + 4096)) - if [ "$global_file_max" -lt $minimal_file_max ] - then - echo $minimal_file_max > /proc/sys/fs/file-max - fi - ulimit -n $SQUID_MAXFD + [ -n "$SQUID_MAXFD" ] || return + [ -f /proc/sys/fs/file-max ] || return 0 + [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192 + local global_file_max=`cat /proc/sys/fs/file-max` + local minimal_file_max=$(($SQUID_MAXFD + 4096)) + if [ "$global_file_max" -lt $minimal_file_max ]; then + echo $minimal_file_max > /proc/sys/fs/file-max + fi + ulimit -n $SQUID_MAXFD } checkconfig() { - maxfds - CACHE_SWAP=`sed -e 's/#.*//g' /etc/squid/squid.conf | \ - grep cache_dir | awk '{ print $3 }'` - [ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/cache/squid - umask 027 - for x in $CACHE_SWAP ; do - if [ ! -d $x/00 ] ; then - einfo "Initializing cache directory: $x" - cd $x - /usr/sbin/squid -z -F 2>/dev/null - if [ $? -ne 0 ] ; then - eerror "Error initializing: $x" - return 1 - fi - fi - done + maxfds + local CACHE_SWAP=`awk '/^[ \t]*cache_dir[ \t]+/ { printf "%s ", $3 ; }' < /etc/squid/squid.conf` + [ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/cache/squid + umask 027 + for x in $CACHE_SWAP ; do + if [ ! -d $x/00 ] ; then + ebegin "Initializing cache directories" + local INIT_CACHE_RESPONSE=`/usr/sbin/squid -z -N -D 2>&1` + if [ $? != 0 ] || [ "$INIT_CACHE_RESPONSE" != "${INIT_CACHE_RESPONSE/erminated abnormally}" ]; then + eend 1 + echo "$INIT_CACHE_RESPONSE" + return 1 + fi + eend 0 + break + fi + done + return 0 } start() { - checkconfig || return 1 - ebegin "Starting squid" - /usr/sbin/squid ${SQUID_OPTS} - eend $? && sleep 1 + checkconfig || return 1 + ebegin "Starting squid" + /usr/sbin/squid ${SQUID_OPTS} + eend $? && sleep 1 } stop() { - ebegin "Stopping squid" - /usr/sbin/squid -k shutdown - # Now we have to wait until squid has _really_ stopped. - sleep 1 - if [ -f /var/run/squid.pid ] ; then - einfon "Waiting ." - cnt=0 - while [ -f /var/run/squid.pid ] ; do - cnt=`expr $cnt + 1` - if [ $cnt -gt 60 ] ; then - # Waited 120 seconds now. Fail. - eend 1 "Failed." - break - fi - sleep 2 - echo -n "." - done - echo -n "done." - eend 0 - else - eend 0 - fi + ebegin "Stopping squid" + /usr/sbin/squid -k shutdown + # Now we have to wait until squid has _really_ stopped. + sleep 1 + if [ -f /var/run/squid.pid ] ; then + einfon "Waiting ." + cnt=0 + while [ -f /var/run/squid.pid ] ; do + cnt=`expr $cnt + 1` + if [ $cnt -gt 60 ] ; then + # Waited 120 seconds now. Fail. + eend 1 "Failed." + break + fi + sleep 2 + echo -n "." + done + eend 0 + else + eend 0 + fi } reload() { - checkconfig || return 1 - ebegin "Reloading squid" - /usr/sbin/squid -k reconfigure - eend $? + checkconfig || return 1 + ebegin "Reloading squid" + /usr/sbin/squid -k reconfigure + eend $? } |