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

Walter Doekes (JIRA) noreply at issues.asterisk.org
Fri Dec 9 07:11:10 CST 2016


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

Walter Doekes closed ASTERISK-26350.
------------------------------------

                  Resolution: Fixed
    Target Release Version/s: 11.24.0
                              13.12.0
                              14.1.0

> 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
>            Assignee: Walter Doekes
>            Severity: Minor
>      Target Release: 14.1.0, 13.12.0, 11.24.0
>
>
> 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