summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-09-12 09:03:48 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-09-12 09:03:48 -0500
commitc833c1fda126870cd9c59461063923558b6b9c6e (patch)
tree4c0bfc573de6db66b4c8c83ce867ec51dca4165e
parent7580a736bb30577d7557aac9165894dc9f9583e6 (diff)
parent7ed5dc2c586e7a5e68aecb91f3083041176e7ea7 (diff)
Merge "contrib: Let safe_asterisk script continue without /dev/tty9." into 13
-rw-r--r--contrib/scripts/safe_asterisk13
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