summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2012-10-23 07:01:48 +0000
committerEray Aslan <eras@gentoo.org>2012-10-23 07:01:48 +0000
commitff95710c0c3e127385f48272c177607a62f7cfa6 (patch)
treea37026c0e86d5fb2e9ec32320bd51f5957d878cd /net-proxy
parentAdd comment for doxygen patch. (diff)
downloadhistorical-ff95710c0c3e127385f48272c177607a62f7cfa6.tar.gz
historical-ff95710c0c3e127385f48272c177607a62f7cfa6.tar.bz2
historical-ff95710c0c3e127385f48272c177607a62f7cfa6.zip
Init script: need net -> use net
Package-Manager: portage-2.2.0_alpha141/cvs/Linux x86_64 Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/squid/ChangeLog6
-rw-r--r--net-proxy/squid/Manifest32
-rw-r--r--net-proxy/squid/files/squid.initd-logrotate-r1121
-rw-r--r--net-proxy/squid/files/squid.initd-r1128
-rw-r--r--net-proxy/squid/squid-3.2.3.ebuild6
5 files changed, 274 insertions, 19 deletions
diff --git a/net-proxy/squid/ChangeLog b/net-proxy/squid/ChangeLog
index 52fc8ad9886c..a08d722d6ed0 100644
--- a/net-proxy/squid/ChangeLog
+++ b/net-proxy/squid/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-proxy/squid
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/ChangeLog,v 1.356 2012/10/23 06:55:06 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/ChangeLog,v 1.357 2012/10/23 07:01:47 eras Exp $
+
+ 23 Oct 2012; Eray Aslan <eras@gentoo.org> +files/squid.initd-logrotate-r1,
+ +files/squid.initd-r1, squid-3.2.3.ebuild:
+ Init script: need net -> use net
*squid-3.2.3 (23 Oct 2012)
diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest
index 56e0f3cb3b69..bb0842171cbc 100644
--- a/net-proxy/squid/Manifest
+++ b/net-proxy/squid/Manifest
@@ -10,6 +10,8 @@ AUX squid.confd 540 SHA256 aeef7060c50074b65c664fc106d7319ce380d25320ee2ee00f7d6
AUX squid.cron 143 SHA256 4c9e2afe5b0bba583ce896233ea1f9262beeb1b6cf51b4adb48d5f5c03933b2f SHA512 cec563c20799ffea8b4fb418d5015d6dc437bd38c35e7150ed01bc298dab5214132e10f4e7b8176da1966e16a7f53f423c36e8419642cb16716f5c346c30d749 WHIRLPOOL 029c94d4e4826ee612c7dc12acc088e3100c9d1737baebb74b25b6e7ac2ba78d0bab9f744c12b5de4113c9727892c9a30dd17067409ac8da62afeee552de391e
AUX squid.initd 3331 SHA256 7a81926479941054358bce650c8c9d3f070a7b40c886e5ed3a337668997bc0ab SHA512 6b5157ed3f4db52db9064a5cfcf5ce3429caf38cefbe61955154f2b6371ade5916b278b61ed01ced51cbd11e283553f7c4bde09e97c261a75a6a1da9bb1cfeb1 WHIRLPOOL bc549677659f88280e9f424deb6cd84de9d564707b949e59d425680f2f2565c7579c6a27fe09794887eef8498d5522efcb2035b81e3bfd48e2f34073438cadd4
AUX squid.initd-logrotate 3179 SHA256 3edb51b43218b8bdf5eee0f58f03d8a0fe5c470db1e81992c036649b1b1d5f85 SHA512 a63eaa48fb41dfaa280eae7655eec3f12ab6f9f0ebd9575ac85b1d243a5b21da0df796076a6264b2a1818c700aa50d61478dfcde46302bd32ed8d9be1ccf8299 WHIRLPOOL 27968fd84b67442b24e98d774a6f4038267e614203d42705ae85866c777ed1c71361e287bf8e4cdf0ca6672601b5bdf6817cf68470fdd28de7fb7137a842e98e
+AUX squid.initd-logrotate-r1 3167 SHA256 cd245c5561a9ded59d71f1e73b3c97a56e4253325dec7054435b4d07d222e9a0 SHA512 818d875560f0b85920353af9ee2337c1109d14c34d623583708a44a53169889b864a281d03aa64ef1809b11852a619eca086b632aec8360750fa8ae8d7f22e99 WHIRLPOOL c15bf7f705f1c0f9d6a714ab97c73a2793d8a0e9a15cb2cc17e717f4729ea3cd892fd8969c5ba3afeff41586f424ded077aaef3958a64a2c14584a905061f4b7
+AUX squid.initd-r1 3319 SHA256 f38e04ba1e295e9bbb537e353823c4bd738d206f4790d024e65aacfefbfe7abb SHA512 fc60c330dfebc2ff9f964b6475d8d00fcf69211384b605b68fef95daf5adc23c0d9fe1b72d858923449f7f024e8520bb7aa17d1ffa55e40f8de2726aa234125a WHIRLPOOL 27a43a425b67fb00a654b9bb71062aac63c7c4885bbd9493341043bb7147f8f7ac89ab79e015008f9da10b0a68f00b038d1ef932f7e0c350dfc9b3fc0fd9033e
AUX squid.logrotate 103 SHA256 e5ddce1c9af851040affa15e1a59e89d8db0f2eea7c461320a1d3784578f4482 SHA512 d75a667c3ffa32fdd938ef40df8813a467d9f10b2363107bf915cb0c99834fbe8d0eb502a18a816875b67b0db1b27806ed3caf620c38516040cb644b225f5a55 WHIRLPOOL 1cbce1fb05d4661d26f80baeafad0d3a5de1108a21eb6519775b9be2c549d1ca1b85575b72941fd246e4e9fbdf466b302b767aa7ce002f990f6ca4a9844e1e41
AUX squid.pam 315 SHA256 68ef4282f9fb8506df710d0ae16e84e991e9b138c7f1d0af922682219c7a971f SHA512 a73c98eef2d99bfd871c192195f3c815bff1cd4fa66b87ac185fde891e5cf5fb464fe0ce376c16ac68065c53726784229ad96c24835138244eee2ca2807887c3 WHIRLPOOL e8a6345c634694ce1e21fc4d69ea059d2da9f5d3b7ad34b4a49c570161cddab615fb4ed9e274397ddd4887e4b027aa90339bb8fbb5a71f3bdf506d70cefb99c1
DIST squid-2.7.STABLE9.tar.gz 1789462 SHA256 d54ca048313c4b64609fcdf9f1934a70fc1702032a5f04073056d7491d3dd781 SHA512 171a2c06bd333e3439c1cb63bef4ab417234de3c6eb23ad507cf9d98508d9f86832f10ae5bf8fc689a0dbd3f93006d835e7aa3a6b3c849abd23fa5c9dc9f0259 WHIRLPOOL d32e8824aec5c477e25dfed53879916e087f8d9d6bf140e732fa8ceba5a7095d1b74d25c6efa0b8f0e7319c097e2d6fe64157dafbe57c2fa08e6e0684fb957d8
@@ -32,23 +34,23 @@ EBUILD squid-3.1.21.ebuild 6641 SHA256 494236982f99275d67fd1e1241bd1dc42dfd90d65
EBUILD squid-3.2.1-r1.ebuild 7539 SHA256 c60b2a3c9e484d3fa7396149035f034ba75dd54881b9725cd7fec02036c2055f SHA512 5c7ae91e33719ce863f8d7ef105b6480c40e728ac86cc189493765e991da3319ae83da6172cb5684e6b0aa5e91c9da9a0ffe67ecad2797ed30026638788847b0 WHIRLPOOL 8c6ca3126d25ab3bfc8c7921fdd4fc4d040742f8114a8ed574e52d44bdb44ca3ed998b8ce0782e145c31c82a286aa394539c50220ff451b997d782aaed254864
EBUILD squid-3.2.1.ebuild 7633 SHA256 e9feee56fb5075f7418e07112cdfa6c8a2122817dfb6974566e61cdf6512dcb0 SHA512 3998b35a6f4b481dea00e2b994ada0f865b24ae9b1005220f0accafed1f42ec46b834e7a0dc18dbd5ccf5bde093eca892880ef82b5a8a0200434dd8bc5c6d5d9 WHIRLPOOL 4efb6d6025fe4d4e8a72a480e0955f6e5f96af0e1edfc82eacd804e752af2f5a02da62a6acf398be1b59783dc3f7a4a2a6cc3963c21b39a59766701667b6c6ec
EBUILD squid-3.2.2.ebuild 7543 SHA256 9f114785930aa4435c1ed13eeeebeecae588bc93236f229a2debf7a0c0cd2cef SHA512 6550e6326ad6f8775315489073d3f43c513744b2438b7f53a7d5f63f4906f00297467dcc52c2bfa3b2846f1ca9048d26ee5b5024d0a279be2310a7fe301a87c8 WHIRLPOOL a19028b19101480ce8ecd4f166da0925b73eac81d135dcc412ab08be5a57bbef407461aea21a68f3c8cbf5fed0f6b0bc00110aeae7874e2b4bfed94c466ad8cb
-EBUILD squid-3.2.3.ebuild 7541 SHA256 129ea233e291a3e6b3e780a2513a64c875461f7727ce3a3f8647f15b8d4064e7 SHA512 8bef993b6f582aa4e995fe17bc8c098052089f28a478183fdfde56c258095c1dd80efe2fa1c32ec53d1fcb6414207d736a84c72435b01806ffb0be0af5ab6269 WHIRLPOOL e356e7c26b69c2368285b8debc15ba34066f0a16c7a307752fed8da5859743082852ce7a60d89f19424d7b8771f3ca2bddcfc3de92217e39ff7892f755fa61a9
-MISC ChangeLog 73406 SHA256 42035931ffc8e1868bf202430c5b4316f8d11a1afa02e40975b983641b1ef6cc SHA512 c3656db0d675586a6c7052445fc5db573053aeb3564f4ca5d8c3a71a91eeb40e4195266ad655080c5c7b6fed263c9db6caa5dedf1766f788c39a6250a6cf8563 WHIRLPOOL 12a933500d59e43d07eedc6a5cdabd432b0dde5019d9daf4e47ad4716df58a338a9edfc7b986b0b5044bae1048b2e080411ec6229b8c908b432db71fa6d63d93
+EBUILD squid-3.2.3.ebuild 7547 SHA256 508935c3a6224c483ab6f6d465f0af56d67bc4196b1cd4b23b1dd15e2e02c0af SHA512 31569ec71ad08c57b5fdb9d5e6314ac2085d6f6e1fb63c4ad1c98b6028ccc5484f4248086d809e76e56ca31c6b10c93d59cc974f66d23c14f051ce3963b4a649 WHIRLPOOL 3782024f9fa6881912410b53a9adb09b3320f710914b49ea0cd44f36007b62ab26eb0af00d3eed50aea5a6f576f2d45d4cbc07caa1e7cd96f077f5b94a1aeb65
+MISC ChangeLog 73564 SHA256 478a77cacd57ff579ae79d450274e5ae92a77ff7bfd4d94ae36054684803df87 SHA512 0391e50fe467f821a6f0f5f36e9dede4364c539afb1babb67aa8dee39576d5eca03509627090f5ec2fed1d1bbb0382632536d79189fca5c607b0f51552b1c7ef WHIRLPOOL 3895d33693218920f693c9c1bd80d80c6cd121e14704eea31163dcb82a18de4971ca491976639f8aa322733dbb1a9bf80d9227ed1a11621e585597f03270ea47
MISC metadata.xml 1335 SHA256 07a1e3761c3f3f2c3524057a7321fef17742203c3ede39066e89da593e4c6265 SHA512 1876ea4e243a6a95e748cd471823191713fa5dad5fc64343e35d7cf345e504e2ab56109b9b8a1f4c0740c03770026773c825abd5a9635eea74e35aa67bcf55d3 WHIRLPOOL c0b2399f9c8f78a28753d27520c4d64e3c8aa8894e66f12162e0197e85cd9a81949e5e5868b2461ddb1d757b52a97674105820fd6e84fa4946d410e00effd965
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQIcBAEBCAAGBQJQhj9WAAoJEHfx8XVYajsf+cIP/3ECj1ljkufmKylzL4A2R77n
-pU9RHpiibvlq8q3rNWztrz+q6pUOWranQOb6DGgJohubn4SurmQmq7nlC5/w8qoS
-IcrnYZGlaII6F4D2hDhgt5YodsbX28nExJDdIbwf9U8Q+0gQ0eG2vKoZ6nDtyQQz
-jgoLhQvW1BLEnrPPfPjux6Z3xuIoqhr1rr7aqLnabJEoEFUxDXs6Njz5BWwGTLRQ
-wUwJ1q1oDyE+cZWxy5yPy+LPZbR8J8jfgx4ztePmX61n1D1o618sse3+qH+K9L4J
-oqrUf6j/GRsedRLxFYjqoDRuZu3Ph6C0se0+AoiDJ337sjroHeMaSZbzDTOIxdLZ
-mfPwgBtvw5CzEqSTZKY3vP1YweW/i7uUbJiWeCOYRP+Iov+/6vAqM7sghQUO5DZV
-W0dQunOZMiVrH9D342bdTnrPi6zUQ/mg74QqpMcIqDnssyfyuIif2QD+pJs8QeqP
-OPZi4Zn2zgq5U7U0anwuP2BUC4IKcrUyxfp3xDOtzD6nFOxkdXiAEFrdVU/gzgWl
-GSAEmvVR0khFvviAfRtEMs0JJjtVlwW0dqtBzO3dw/lNZp6YReVLfyiL//F3mezV
-35wkocvCiQ6LYYlAQ+VwC1+qc8nGBecsIFBDAFZtHV2VBQ1/8LfNwIyE29DY2Ks1
-v3Vry46uBH/plNhTY0SO
-=2Mzk
+iQIcBAEBCAAGBQJQhkDcAAoJEHfx8XVYajsfKcIP/A7ffL4+NtHtzUQOm54LsokZ
+ApvTsF79JRerL/O5EGf5vbP5BRNYqqMit7eW8Mbyo+vQE6DtTPgpRpfSCIAZTbJZ
+jjyyHFmtF3hW5JRfHeUIDHcOyRMWL38EX+RGwo2Osu4t3nVO7llX90S2nkGR4L03
+6nVg7MGZUqVCtRkT341XpOsUPPY9jhvJDqEEz57VQmHTnKvIvhjBIACilaT8WnKT
+teczecTIJV+sIUQkBgwXWtmY59iiyi8rdcgvPtRu8L1jhMBqibG7kYODWOAMacgA
+PQtUr9uZ8iwxuSaBs3pG6KVqjVMDXuljdSKK1fXkmbDl9cS0SqqMnE+Seam1+ltr
+bHVCtfUvMR/6jCYYv4QjCd6LHeXCnpBSDZ0eFNJPEPBnMW0mXgUTcoJ8oi6iQiu2
+s6x9P6af/kMM7YVv3ZxMWsj0aUoA11ms6pcanJqH1aTDg7+vLenHhg404fFjorND
+qXFwWcDRm3/1qVnLfO6ctxhILafwpTL9n0PjW37UbY1qx8CN73vEW0ooNxre5iK9
+C+LSvgCtTWRYFFMss/O/ISHVJoet51J2FGIVUjW5WuZWKwKis1EnY4XLfhzc0dRg
+QjqUkfX2Sjf3oHaLacgT1V2bWlNYi3LQeZ9P/BLF6JY9mIEWWJbmn60aHIyiw4eh
+CBEEzWIu1ZBuKrxK0vZv
+=MUgN
-----END PGP SIGNATURE-----
diff --git a/net-proxy/squid/files/squid.initd-logrotate-r1 b/net-proxy/squid/files/squid.initd-logrotate-r1
new file mode 100644
index 000000000000..0285fae25c55
--- /dev/null
+++ b/net-proxy/squid/files/squid.initd-logrotate-r1
@@ -0,0 +1,121 @@
+#!/sbin/runscript
+# Copyright 1999-2012 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-r1,v 1.1 2012/10/23 07:01:47 eras Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ use dns net
+}
+
+upprocval() {
+ [ -f $1 ] || return 0
+ if [ `cat $1` -lt $2 ]; then
+ echo $2 > $1
+ fi
+}
+
+# Try to increase the # of filedescriptors we can open.
+maxfds() {
+ [ -n "$SQUID_MAXFD" ] || return
+ [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192
+ local minimal_file_max=$(($SQUID_MAXFD + 4096))
+ upprocval /proc/sys/fs/file-max $minimal_file_max
+ if /usr/sbin/squid -v | grep -q "\--enable-epoll" ; then
+ upprocval /proc/sys/fs/epoll/max_user_watches $minimal_file_max
+ fi
+ ulimit -n $SQUID_MAXFD
+}
+
+checkconfig() {
+ if [ ! -f /etc/squid/${SVCNAME}.conf ]; then
+ eerror "You need to create /etc/squid/${SVCNAME}.conf first."
+ eerror "An example can be found in /etc/squid/squid.conf.default"
+ return 1
+ fi
+
+ local PIDFILE=$(awk '/^[ \t]*pid_filename[ \t]+/ { print $2 }' < /etc/squid/${SVCNAME}.conf)
+ [ -z ${PIDFILE} ] && PIDFILE=/var/run/squid.pid
+ if [ /var/run/${SVCNAME}.pid != ${PIDFILE} ]; then
+ eerror "/etc/squid/${SVCNAME}.conf must set pid_filename to"
+ eerror " /var/run/${SVCNAME}.pid"
+ eerror "CAUTION: http_port, cache_dir and *_log parameters must be different than"
+ eerror " in any other instance of squid."
+ return 1
+ fi
+
+ maxfds
+
+ local CACHE_SWAP=$(awk '/^[ \t]*cache_dir[ \t]+/ { if ($2 == "coss" ) printf "%s/stripe ", $3 ; else printf "%s/00 ", $3; }' < /etc/squid/${SVCNAME}.conf)
+ [ -z "$CACHE_SWAP" ] && CACHE_SWAP="/var/cache/squid/00"
+
+ local x
+ for x in $CACHE_SWAP ; do
+ if [ ! -e $x ] ; then
+ ebegin "Initializing cache directory ${x%/*}"
+ local ORIG_UMASK=$(umask)
+ umask 027
+
+ if ! (mkdir -p ${x%/*} && chown squid ${x%/*}) ; then
+ eend 1
+ return 1
+ fi
+
+ local INIT_CACHE_RESPONSE="$(/usr/sbin/squid -z -N -f /etc/squid/${SVCNAME}.conf 2>&1)"
+ if [ $? != 0 ] || echo "$INIT_CACHE_RESPONSE" | grep -q "erminated abnormally" ; then
+ umask $ORIG_UMASK
+ eend 1
+ echo "$INIT_CACHE_RESPONSE"
+ return 1
+ fi
+
+ umask $ORIG_UMASK
+ eend 0
+ break
+ fi
+ done
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ KRB5_KTNAME="${SQUID_KEYTAB}" /usr/sbin/squid ${SQUID_OPTS} -f /etc/squid/${SVCNAME}.conf
+ eend $? && sleep 1
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ if /usr/sbin/squid -k shutdown -f /etc/squid/${SVCNAME}.conf ; then
+ # Now we have to wait until squid has _really_ stopped.
+ sleep 1
+ if [ -f /var/run/${SVCNAME}.pid ] ; then
+ einfon "Waiting for squid to shutdown ."
+ cnt=0
+ while [ -f /var/run/${SVCNAME}.pid ] ; do
+ cnt=$(expr $cnt + 1)
+ if [ $cnt -gt 60 ] ; then
+ # Waited 120 seconds now. Fail.
+ echo
+ eend 1 "Failed."
+ break
+ fi
+ sleep 2
+ echo -n "."
+ done
+ echo
+ fi
+ else
+ eerror "Squid shutdown failed, probably service is already down."
+ fi
+ eend 0
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading ${SVCNAME}"
+ /usr/sbin/squid -k reconfigure -f /etc/squid/${SVCNAME}.conf
+ eend $?
+}
diff --git a/net-proxy/squid/files/squid.initd-r1 b/net-proxy/squid/files/squid.initd-r1
new file mode 100644
index 000000000000..86998494172a
--- /dev/null
+++ b/net-proxy/squid/files/squid.initd-r1
@@ -0,0 +1,128 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/files/squid.initd-r1,v 1.1 2012/10/23 07:01:47 eras Exp $
+
+extra_started_commands="reload rotate"
+
+depend() {
+ use dns net
+}
+
+upprocval() {
+ [ -f $1 ] || return 0
+ if [ `cat $1` -lt $2 ]; then
+ echo $2 > $1
+ fi
+}
+
+# Try to increase the # of filedescriptors we can open.
+maxfds() {
+ [ -n "$SQUID_MAXFD" ] || return
+ [ $SQUID_MAXFD -le 8192 ] || SQUID_MAXFD=8192
+ local minimal_file_max=$(($SQUID_MAXFD + 4096))
+ upprocval /proc/sys/fs/file-max $minimal_file_max
+ if /usr/sbin/squid -v | grep -q "\--enable-epoll" ; then
+ upprocval /proc/sys/fs/epoll/max_user_watches $minimal_file_max
+ fi
+ ulimit -n $SQUID_MAXFD
+}
+
+checkconfig() {
+ if [ ! -f /etc/squid/${SVCNAME}.conf ]; then
+ eerror "You need to create /etc/squid/${SVCNAME}.conf first."
+ eerror "An example can be found in /etc/squid/squid.conf.default"
+ return 1
+ fi
+
+ local PIDFILE=$(awk '/^[ \t]*pid_filename[ \t]+/ { print $2 }' < /etc/squid/${SVCNAME}.conf)
+ [ -z ${PIDFILE} ] && PIDFILE=/var/run/squid.pid
+ if [ /var/run/${SVCNAME}.pid != ${PIDFILE} ]; then
+ eerror "/etc/squid/${SVCNAME}.conf must set pid_filename to"
+ eerror " /var/run/${SVCNAME}.pid"
+ eerror "CAUTION: http_port, cache_dir and *_log parameters must be different than"
+ eerror " in any other instance of squid."
+ return 1
+ fi
+
+ maxfds
+
+ local CACHE_SWAP=$(awk '/^[ \t]*cache_dir[ \t]+/ { if ($2 == "coss" ) printf "%s/stripe ", $3 ; else printf "%s/00 ", $3; }' < /etc/squid/${SVCNAME}.conf)
+ [ -z "$CACHE_SWAP" ] && CACHE_SWAP="/var/cache/squid/00"
+
+ local x
+ for x in $CACHE_SWAP ; do
+ if [ ! -e $x ] ; then
+ ebegin "Initializing cache directory ${x%/*}"
+ local ORIG_UMASK=$(umask)
+ umask 027
+
+ if ! (mkdir -p ${x%/*} && chown squid ${x%/*}) ; then
+ eend 1
+ return 1
+ fi
+
+ local INIT_CACHE_RESPONSE="$(/usr/sbin/squid -z -N -f /etc/squid/${SVCNAME}.conf 2>&1)"
+ if [ $? != 0 ] || echo "$INIT_CACHE_RESPONSE" | grep -q "erminated abnormally" ; then
+ umask $ORIG_UMASK
+ eend 1
+ echo "$INIT_CACHE_RESPONSE"
+ return 1
+ fi
+
+ umask $ORIG_UMASK
+ eend 0
+ break
+ fi
+ done
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ KRB5_KTNAME="${SQUID_KEYTAB}" /usr/sbin/squid ${SQUID_OPTS} -f /etc/squid/${SVCNAME}.conf
+ eend $? && sleep 1
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ if /usr/sbin/squid -k shutdown -f /etc/squid/${SVCNAME}.conf ; then
+ # Now we have to wait until squid has _really_ stopped.
+ sleep 1
+ if [ -f /var/run/${SVCNAME}.pid ] ; then
+ einfon "Waiting for squid to shutdown ."
+ cnt=0
+ while [ -f /var/run/${SVCNAME}.pid ] ; do
+ cnt=$(expr $cnt + 1)
+ if [ $cnt -gt 60 ] ; then
+ # Waited 120 seconds now. Fail.
+ echo
+ eend 1 "Failed."
+ break
+ fi
+ sleep 2
+ echo -n "."
+ done
+ echo
+ fi
+ else
+ eerror "Squid shutdown failed, probably service is already down."
+ fi
+ eend 0
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading ${SVCNAME}"
+ /usr/sbin/squid -k reconfigure -f /etc/squid/${SVCNAME}.conf
+ eend $?
+}
+
+rotate() {
+ service_started ${SVCNAME} || return 1
+ ebegin "Rotating ${SVCNAME} logs"
+ /usr/sbin/squid -k rotate -f /etc/squid/${SVCNAME}.conf
+ eend $?
+}
diff --git a/net-proxy/squid/squid-3.2.3.ebuild b/net-proxy/squid/squid-3.2.3.ebuild
index 851c95d78eda..34e95fc93444 100644
--- a/net-proxy/squid/squid-3.2.3.ebuild
+++ b/net-proxy/squid/squid-3.2.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/squid-3.2.3.ebuild,v 1.1 2012/10/23 06:55:06 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/squid/squid-3.2.3.ebuild,v 1.2 2012/10/23 07:01:47 eras Exp $
EAPI=4
inherit eutils pam toolchain-funcs autotools linux-info user versionator
@@ -213,11 +213,11 @@ src_install() {
newpamd "${FILESDIR}/squid.pam" squid
newconfd "${FILESDIR}/squid.confd" squid
if use logrotate; then
- newinitd "${FILESDIR}/squid.initd-logrotate" squid
+ newinitd "${FILESDIR}/squid.initd-logrotate-r1" squid
insinto /etc/logrotate.d
newins "${FILESDIR}/squid.logrotate" squid
else
- newinitd "${FILESDIR}/squid.initd" squid
+ newinitd "${FILESDIR}/squid.initd-r1" squid
exeinto /etc/cron.weekly
newexe "${FILESDIR}/squid.cron" squid.cron
fi