From nobody@FreeBSD.org  Wed Jul 19 00:38:08 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AA8A916A4DD
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jul 2006 00:38:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6423043D45
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jul 2006 00:38:08 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6J0c83Y025097
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Jul 2006 00:38:08 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k6J0c8Wi025096;
	Wed, 19 Jul 2006 00:38:08 GMT
	(envelope-from nobody)
Message-Id: <200607190038.k6J0c8Wi025096@www.freebsd.org>
Date: Wed, 19 Jul 2006 00:38:08 GMT
From: mark burdett <mark@goodstorm.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: squid rc.d script should set the pidfile
X-Send-Pr-Version: www-2.3

>Number:         100501
>Category:       ports
>Synopsis:       squid rc.d script should set the pidfile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xride
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 19 00:40:13 GMT 2006
>Closed-Date:    Mon Nov 06 08:08:57 GMT 2006
>Last-Modified:  Mon Nov 06 08:08:57 GMT 2006
>Originator:     mark burdett
>Release:        6.1
>Organization:
GoodStorm.com
>Environment:
>Description:
The rc.d script for squid should set the pidfile.  The trouble is that if you have multiple instances of squid running, restarting one squid via "/usr/local/etc/rc.d/squid restart" will attempt to restart all squid processes.
>How-To-Repeat:
Add another instance of squid, e.g. /usr/local/etc/rc.d/squid_foo and enable in /etc/rc.conf.
>Fix:
Add a pidfile definition, e.g. "pidfile=/usr/local/squid/logs/$name.pid" to the squid script.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Jul 19 00:57:06 UTC 2006 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100501 

From: Thomas-Martin Seck <tmseck@netcologne.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/100501: www/squid rc.d script should set the pidfile
Date: Sun, 23 Jul 2006 11:11:13 +0200

 Ok, do I understand you correctly if I assume that you have two or more
 copies of the original Squid start script named squid_${instance}?
 
 Then it should be enough if we just pass $squid_flags when calling
 'squid -k reconfigure' and 'squid -k restart' if squid_flags resp.
 squid_instance_flags in your case contains '-f /path/to/squid_instance.conf'
 so Squid is able to figure out which process it should talk to.
 
 Could you try this patch? It should also fix the issue that the 'stop'
 command would probably shutdown all running Squid instances. You need to
 adapt the variable name squid_flags appropriately in every copy of your
 Squid start script so that you can pass the different configuration file
 paths to these scripts individually.
 
 Index: /home/thomas/svn/ports/experimental/squid/files/squid.sh.in
 ===================================================================
 --- /home/thomas/svn/ports/experimental/squid/files/squid.sh.in	(revision 962)
 +++ /home/thomas/svn/ports/experimental/squid/files/squid.sh.in	(revision 963)
 @@ -20,7 +20,7 @@
  command=%%PREFIX%%/sbin/squid
  # --begin rcng
  extra_commands=reload
 -reload_cmd="${command} -k reconfigure"
 +reload_cmd="${command} ${squid_flags} -k reconfigure"
  # --end rcng
  stop_cmd="squid_stop"
  squid_chdir=${squid_chdir:-%%PREFIX%%/squid/logs}
 @@ -44,7 +44,7 @@
  # --begin rcng
  squid_stop() {
  	echo "Stopping ${name}."
 -	${command} -k shutdown
 +	${command} ${squid_flags} -k shutdown
  	run_rc_command poll
  }
  
Responsible-Changed-From-To: freebsd-ports-bugs->xride 
Responsible-Changed-By: xride 
Responsible-Changed-When: Thu Oct 5 18:00:56 UTC 2006 
Responsible-Changed-Why:  
I'll take this one 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100501 

From: Thomas-Martin Seck <tmseck@netcologne.de>
To: Soeren Straarup <xride@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/100501: squid rc.d script should set the pidfile
Date: Mon, 9 Oct 2006 20:20:11 +0200

 I consider adding the patch I proposed in the next regular update of www/squid
 and www/squid26. I still would like to get feedback whether it really
 fixes the problem at hand and does not introduce other problems; so
 please do not commit this change yet.
 
 The PR can be closed as far as I (the maintainer) am concerned.
State-Changed-From-To: feedback->suspended 
State-Changed-By: xride 
State-Changed-When: Mon Oct 9 19:17:57 UTC 2006 
State-Changed-Why:  
Maintainer is considering adding the patch during the next port update but  
will be looking for testing and feedback to see that it does  
not cause any problems. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100501 
State-Changed-From-To: suspended->closed 
State-Changed-By: xride 
State-Changed-When: Mon Nov 6 08:07:24 UTC 2006 
State-Changed-Why:  
Solved by maintainer submitted PR ports/105022 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100501 
>Unformatted:
