ports/107222: stoping problems with rc.d/asterisk-bristuf
Brad Huntting
huntting at glarp.com
Tue Dec 26 23:30:14 UTC 2006
>Number: 107222
>Category: ports
>Synopsis: stoping problems with rc.d/asterisk-bristuf
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 26 23:30:13 GMT 2006
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list