From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 14 08:50:13 2004 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA44D16A4CF for ; Wed, 14 Jan 2004 08:50:13 -0800 (PST) Received: from smtp1.netcologne.de (smtp1.netcologne.de [194.8.194.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EC4D43D8A for ; Wed, 14 Jan 2004 08:49:58 -0800 (PST) (envelope-from tmseck@netcologne.de) Received: from laurel.tmseck.homedns.org (xdsl-213-196-231-75.netcologne.de [213.196.231.75]) by smtp1.netcologne.de (Postfix) with SMTP id CBB9738B54 for ; Wed, 14 Jan 2004 17:49:54 +0100 (MET) Received: (qmail 1225 invoked by uid 1001); 14 Jan 2004 16:49:43 -0000 Date: Wed, 14 Jan 2004 17:49:21 +0100 From: Thomas-Martin Seck To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org Message-ID: <20040114164921.GB867@laurel.tmseck.homedns.org> References: <20040113150120.746.qmail@laurel.tmseck.homedns.org> <200401131510.i0DFAIKX074200@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200401131510.i0DFAIKX074200@freefall.freebsd.org> User-Agent: Mutt/1.4.1i Organization: private site in Germany X-PGP-KeyID: DF46EE05 X-PGP-Fingerprint: A38F AE66 6B11 6EB9 5D1A B67D 2444 2FE1 DF46 EE05 X-Attribution: tms Subject: Re: ports/61315: [Maintainer update] www/squid: massive (mostly infrastructural) update X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2004 16:50:13 -0000 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 ;; *)