Summary: | ASTERISK-26350: safe_asterisk script fails to start if there is no /dev/tty9 (openvz/lxc) | ||
Reporter: | Walter Doekes (wdoekes) | Labels: | |
Date Opened: | 2016-09-09 06:23:10 | Date Closed: | 2016-12-09 07:09:40.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | 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. | ||
Comments: | By: Asterisk Team (asteriskteam) 2016-09-09 06:23:11.362-0500 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]. |