Date: Wed, 14 Jan 2004 17:49:21 +0100 From: Thomas-Martin Seck <tmseck@netcologne.de> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/61315: [Maintainer update] www/squid: massive (mostly infrastructural) update Message-ID: <20040114164921.GB867@laurel.tmseck.homedns.org> In-Reply-To: <200401131510.i0DFAIKX074200@freefall.freebsd.org> References: <20040113150120.746.qmail@laurel.tmseck.homedns.org> <200401131510.i0DFAIKX074200@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
A minor update to this monster patch (I knew I'd overlook something, hopefully there are no other bogons left): - correct indentation in squid.sh - make squid_chdir, squid_flags, and squid_user overridable via the environment or one of the rcNG configuration files instead of hardcoding them. Default squid_flags to "-D", the DNS test does not make much sense anymore (IIRC it is no longer turned on in squid-3). Index: files/squid.sh =================================================================== RCS file: /usr/local/cvsroot/projekte/FreeBSD/ports/www/squid/files/squid.sh,v retrieving revision 1.2 diff -u -r1.2 squid.sh --- files/squid.sh 14 Jan 2004 15:33:47 -0000 1.2 +++ files/squid.sh 14 Jan 2004 16:45:35 -0000 @@ -12,8 +12,7 @@ # having installed the rc_subr-port on an earlier system) you must set # "squid_enable=YES" in either /etc/rc.conf, /etc/rc.conf.local or # /etc/rc.conf.d/squid to make this script actually do something. There -# you can also specify additional commandline options for squid using -# "squid_flags=". +# you can also set squid_chdir, squid_user, and squid_flags. # # Please see squid(8), rc.conf(5) and rc(8) for further details. @@ -23,8 +22,9 @@ extra_commands=reload reload_cmd="${command} -k reconfigure" stop_cmd="${command} -k shutdown" -squid_chdir=%%PREFIX%%/squid/logs -squid_user=%%SQUID_UID%% +: ${squid_chdir:=%%PREFIX%%/squid/logs} +: ${squid_user:=%%SQUID_UID%%} +: ${squid_flags:="-D"} default_config=%%PREFIX%%/etc/squid/squid.conf if [ -f /etc/rc.subr ]; then @@ -48,9 +48,6 @@ required_dirs=${squid_chdir} run_rc_command "$1" else - # Configure squid_flags directly in the non-rcNG case; see - # squid(8) for a list of available options: - squid_flags="" case $1 in start) if [ -x "${command}" -a \ @@ -62,11 +59,11 @@ ;; stop) if [ -x "${command}" ]; then - echo -n ' squid' - ${stop_cmd} - while ps -xcU ${squid_user} | grep -q squid; do - sleep 2 - done + echo -n ' squid' + ${stop_cmd} + while ps -xcU ${squid_user} | grep -q squid; do + sleep 2 + done fi ;; *)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040114164921.GB867>