diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-09-12 08:42:18 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-09-12 08:42:18 -0500 |
commit | 50c3bb2631edc5063833d51a5d1091d5344d1b77 (patch) | |
tree | cc66747f069dc08e03034a5739d9a2110aa2a488 | |
parent | 9d54dd04bbdad6849aee77536ab12c5fa6620680 (diff) | |
parent | 56caf5402c14c663805e6ef4cac3e5e9be87b4bd (diff) |
Merge "contrib: Let safe_asterisk script continue without /dev/tty9."
-rw-r--r-- | contrib/scripts/safe_asterisk | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/contrib/scripts/safe_asterisk b/contrib/scripts/safe_asterisk index 62f3dadc2..66213a530 100644 --- a/contrib/scripts/safe_asterisk +++ b/contrib/scripts/safe_asterisk @@ -120,13 +120,20 @@ if test -n "$TTY" && test "$TTY" != "no"; then TTY=tty${TTY} elif test -c /dev/vc/${TTY}; then TTY=vc/${TTY} + elif test "$TTY" = "9"; then # ignore default if it was untouched + # If there is no /dev/tty9 and not /dev/vc/9 we don't + # necessarily want to die at this point. Pretend that + # TTY wasn't set. + TTY= else message "Cannot find specified TTY (${TTY})" exit 1 fi - ASTARGS="${ASTARGS} -vvvg" - if test "$CONSOLE" != "no"; then - ASTARGS="${ASTARGS} -c" + if test -n "$TTY"; then + ASTARGS="${ASTARGS} -vvvg" + if test "$CONSOLE" != "no"; then + ASTARGS="${ASTARGS} -c" + fi fi fi |