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
@@ -105,7 +105,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
@@ -145,7 +145,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}
