From huntting@glarp.com  Tue Dec 26 23:22:21 2006
Return-Path: <huntting@glarp.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 68EF516A407
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Dec 2006 23:22:21 +0000 (UTC)
	(envelope-from huntting@glarp.com)
Received: from antediluvian.glarp.com (71-211-143-233.hlrn.qwest.net [71.211.143.233])
	by mx1.freebsd.org (Postfix) with ESMTP id 1578D13C48F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Dec 2006 23:22:20 +0000 (UTC)
	(envelope-from huntting@glarp.com)
Received: from antediluvian.glarp.com (localhost [127.0.0.1])
	by antediluvian.glarp.com (8.13.8/8.13.6) with ESMTP id kBQMjlfQ002119
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NOT)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Dec 2006 15:45:48 -0700 (MST)
	(envelope-from huntting@antediluvian.glarp.com)
Received: (from huntting@localhost)
	by antediluvian.glarp.com (8.13.6/8.13.6/Submit) id kBQMjl41002118;
	Tue, 26 Dec 2006 15:45:47 -0700 (MST)
	(envelope-from huntting)
Message-Id: <200612262245.kBQMjl41002118@antediluvian.glarp.com>
Date: Tue, 26 Dec 2006 15:45:47 -0700 (MST)
From: Brad Huntting <huntting@glarp.com>
Reply-To: Brad Huntting <huntting@glarp.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: stoping problems with rc.d/asterisk-bristuf
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         107222
>Category:       ports
>Synopsis:       stopping problems with rc.d in net/asterisk-bristuff
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    sobomax
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 26 23:30:13 GMT 2006
>Closed-Date:    Sun Jul 22 10:46:35 GMT 2007
>Last-Modified:  Sun Jul 22 10:50:16 GMT 2007
>Originator:     Brad Huntting
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD antediluvian.glarp.com 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


>Description:

	/usr/local/etc/rc.d/asterisk stop

	sometimes hangs, unable to kill the asterisk server.

>How-To-Repeat:
	/usr/local/etc/rc.d/asterisk stop

>Fix:

	This patch to the rc.d script send asterisk the 'stop now'
	command (and waits for it's return, prior to sending a
	SIGKILL).  This seems to work more reliably than simply
	sending a SIGTERM to the server.

	The same patch could (should?) be applied to the net/asterisk
	port as well as the net/asterisk-bristuff port.


diff -ur /usr/ports/net/asterisk-bristuff/files/asterisk.sh.in /tmp/asterisk-bristuff/files/asterisk.sh.in
--- /usr/ports/net/asterisk-bristuff/files/asterisk.sh.in	Wed Nov  8 04:26:59 2006
+++ /tmp/asterisk-bristuff/files/asterisk.sh.in	Tue Dec 26 15:39:51 2006
@@ -16,7 +16,15 @@
 rcvar=`set_rcvar`
 
 command=%%PREFIX%%/sbin/asterisk
+stop_precmd=asterisk_shutdown
+sig_stop=KILL
 
+asterisk_shutdown () {
+	/usr/local/sbin/asterisk -qrx 'stop now'
+	sleep 1
+	return 0
+}
+ 
 load_rc_config $name
 
 pidfile=${asterisk_pidfile:-"/var/run/asterisk.pid"}
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->fjoe 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Dec 27 04:34:32 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107222 
Responsible-Changed-From-To: fjoe->sobomax 
Responsible-Changed-By: fjoe 
Responsible-Changed-When: Tue Jul 3 16:26:02 UTC 2007 
Responsible-Changed-Why:  
Over to main port maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=107222 
State-Changed-From-To: open->closed 
State-Changed-By: sobomax 
State-Changed-When: Sun Jul 22 10:46:31 UTC 2007 
State-Changed-Why:  
Commited with some mods, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/107222: commit references a PR
Date: Sun, 22 Jul 2007 10:40:43 +0000 (UTC)

 sobomax     2007-07-22 10:40:35 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/asterisk         Makefile distinfo pkg-plist 
     net/asterisk/files   asterisk.sh.in patch-Makefile 
                          patch-configure 
   Removed files:
     net/asterisk/files   patch-main::utils.c 
   Log:
   o Update to 1.4.8, which fixes some security issues.
   
   PR:             114720, 114712
   
   o Enable zaptel channel and friends on AMD64.
   
   PR:             112624
   
   o Improve startup script.
   
   PR:             107222
   
   Revision  Changes    Path
   1.74      +8 -7      ports/net/asterisk/Makefile
   1.25      +3 -3      ports/net/asterisk/distinfo
   1.7       +8 -0      ports/net/asterisk/files/asterisk.sh.in
   1.20      +9 -9      ports/net/asterisk/files/patch-Makefile
   1.2       +73 -18    ports/net/asterisk/files/patch-configure
   1.2       +0 -14     ports/net/asterisk/files/patch-main::utils.c (dead)
   1.29      +4 -4      ports/net/asterisk/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
