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

Asterisk Team (JIRA) noreply at issues.asterisk.org
Fri Sep 9 06:24:01 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232226#comment-232226 ] 

Asterisk Team commented on ASTERISK-26350:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> 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.
> On 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