[svn-commits] mvanbaak: trunk r135061 - /trunk/contrib/scripts/safe_asterisk

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 1 07:17:34 CDT 2008


Author: mvanbaak
Date: Fri Aug  1 07:17:33 2008
New Revision: 135061

URL: http://svn.digium.com/view/asterisk?view=rev&rev=135061
Log:
Make safe_asterisk work on dash/sh/bash etc.

(closes issue #13111)
Reported by: pabelanger
Patches:
      2008071901_issue13111_safe_asterisk.diff uploaded by mvanbaak (license 7)
Tested by: mvanbaak, pabelanger

Modified:
    trunk/contrib/scripts/safe_asterisk

Modified: trunk/contrib/scripts/safe_asterisk
URL: http://svn.digium.com/view/asterisk/trunk/contrib/scripts/safe_asterisk?view=diff&rev=135061&r1=135060&r2=135061
==============================================================================
--- trunk/contrib/scripts/safe_asterisk (original)
+++ trunk/contrib/scripts/safe_asterisk Fri Aug  1 07:17:33 2008
@@ -28,7 +28,7 @@
 # set to the system's maximum files open devided by two, if not set here.
 # MAXFILES=32768
 
-function message() {
+message() {
 	echo "$1" >&2
 	if [ "$SYSLOG" != "" ]; then
 	    logger -p "${SYSLOG}.warn" -t safe_asterisk[$$] "$1"
@@ -141,7 +141,7 @@
 		if [ "$TTY" != "" ]; then
 			cd /tmp
 			stty sane < /dev/${TTY}
-			nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}
+			nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
 		else
 			cd /tmp
 			nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}




More information about the svn-commits mailing list