[asterisk-bugs] [JIRA] (ASTERISK-25695) safe_asterisk -c breaks color in asterisk -r because of missing TERM for /dev/tty.

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Jan 14 06:46:33 CST 2016


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

Asterisk Team commented on ASTERISK-25695:
------------------------------------------

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 -c breaks color in asterisk -r because of missing TERM for /dev/tty.
> ----------------------------------------------------------------------------------
>
>                 Key: ASTERISK-25695
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25695
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>            Reporter: Walter Doekes
>            Severity: Minor
>
> Unfortunately, color support isn't sane yet.
> If asterisk is started with console=yes and the TERM environment variable isn't set to something that supports color, then {{asterisk -r}} doesn't get any color.
> In fact, we're talking two bugs:
> (1) safe_asterisk default settings break color support in rasterisk.
> (2) Asterisk reads TERM in the master process to decide whether color support should be enabled in data fed to the rasterisken.
> Quickest/partial fix would be to fix 1:
> for example, we could do this:
> {noformat}
> --- a/contrib/scripts/safe_asterisk
> +++ b/contrib/scripts/safe_asterisk
> @@ -125,6 +125,9 @@ if test -n "$TTY" && test "$TTY" != "no"; then
>         fi
>         ASTARGS="${ASTARGS} -vvvg"
>         if test "$CONSOLE" != "no"; then
> +               # If TERM is not set, the rasterisk would get no color.
> +               # Set to safe default for BSD and Linux.
> +               test -z "$TERM" && export TERM=xterm
>                 ASTARGS="${ASTARGS} -c"
>         fi
>  fi
> {noformat}
> (I hereby release all my claims for this inline patch, as usual)
> However, that might enable color support for several installations, and that would cause more visibility to the fact that the {{-n}} option does absolutely nothing (ooh, bug number (3)!) -- except disable color support on the application itself, but not for feeding back/forth data from the (colorized) asterisk daemon.



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



More information about the asterisk-bugs mailing list