Package: asterisk / 1:1.6.2.9-2+squeeze12

safe_asterisk-config Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Subject: use /etc/default/settings for configuring safe_asterisk (vendor specific)
Author: Faidon Liambotis <paravoid@debian.org>
Bug-Debian: http://bugs.debian.org/381786
Last-Update: 2010-02-14

Use ASTSAFE_TTY and ASTSAFE_CONSOLE from /etc/default/asterisk to configure
safe_asterisk.

--- a/contrib/scripts/safe_asterisk
+++ b/contrib/scripts/safe_asterisk
@@ -112,7 +116,7 @@ ulimit -c unlimited
 # Don't fork when running "safely"
 #
 ASTARGS=""
-if test "x$TTY" != "x" ; then
+if test "x$TTY" != "xno" ; then
 	if test -c /dev/tty${TTY} ; then
 		TTY=tty${TTY}
 	elif test -c /dev/vc/${TTY} ; then
@@ -152,7 +156,7 @@ run_asterisk()
 {
 	while :; do 
 
-		if test "x$TTY" != "x" ; then
+		if test "x$TTY" != "xno" ; then
 			cd /tmp
 			stty sane < /dev/${TTY}
 			nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}