Skip to content
Snippets Groups Projects
Commit d1df7bfc authored by Michiel van Baak's avatar Michiel van Baak
Browse files

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 32edf478
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ PRIORITY=0 ...@@ -28,7 +28,7 @@ PRIORITY=0
# set to the system's maximum files open devided by two, if not set here. # set to the system's maximum files open devided by two, if not set here.
# MAXFILES=32768 # MAXFILES=32768
function message() { message() {
echo "$1" >&2 echo "$1" >&2
if [ "$SYSLOG" != "" ]; then if [ "$SYSLOG" != "" ]; then
logger -p "${SYSLOG}.warn" -t safe_asterisk[$$] "$1" logger -p "${SYSLOG}.warn" -t safe_asterisk[$$] "$1"
...@@ -141,7 +141,7 @@ run_asterisk() ...@@ -141,7 +141,7 @@ run_asterisk()
if [ "$TTY" != "" ]; then if [ "$TTY" != "" ]; then
cd /tmp cd /tmp
stty sane < /dev/${TTY} 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 else
cd /tmp cd /tmp
nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment