[asterisk-bugs] [JIRA] (ASTERISK-26350) safe_asterisk script fails to start if there is no /dev/tty9 (openvz/lxc)

Joshua Colp (JIRA) noreply at issues.asterisk.org
Mon Sep 12 07:22:01 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-26350:
-----------------------------------

    Reviewboard Link: https://gerrit.asterisk.org/3867 https://gerrit.asterisk.org/3868 https://gerrit.asterisk.org/3869 https://gerrit.asterisk.org/3870

> safe_asterisk script fails to start if there is no /dev/tty9 (openvz/lxc)
> -------------------------------------------------------------------------
>
>                 Key: ASTERISK-26350
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26350
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>            Reporter: Walter Doekes
>            Severity: Minor
>
> If you use the safe_asterisk script, it uses hardcoded defaults before running configurable values from /etc/asterisk/startup.d.
> One of those hardcoded values is TTY=9.
> When it gets to this bit:
> {noformat}
> # Don't fork when running "safely"
> #
> ASTARGS=""
> if test -n "$TTY" && test "$TTY" != "no"; then
>         if test -c /dev/tty${TTY}; then
>                 TTY=tty${TTY}
>         elif test -c /dev/vc/${TTY}; then
>                 TTY=vc/${TTY}
>         else
>                 message "Cannot find specified TTY (${TTY})"
>                 exit 1
>         fi
>         ASTARGS="${ASTARGS} -vvvg"
>         if test "$CONSOLE" != "no"; then
>                 ASTARGS="${ASTARGS} -c"
>         fi
> fi
> {noformat}
> safe_asterisk stops if there is no /dev/tty9 and no /dev/vc/9, before custom config from startup.d is run where we can alter the TTY= value.
> In certain containerized environments (e.g. lxc and openvz) there is no /dev/tty9, and safe_asterisk is unusable unless manually altered.
> Suggested fix: don't die at that point, but simply warn and blank out the TTY variable.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list