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

Walter Doekes (JIRA) noreply at issues.asterisk.org
Thu Jan 14 07:29:33 CST 2016


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

Walter Doekes edited comment on ASTERISK-25695 at 1/14/16 7:28 AM:
-------------------------------------------------------------------

/me shakes fist at the color support

Would you mind attaching the patch? We typically don't accept inline patches, even one liners. The link between your license agreement and the patch in our system is based on the patch file attachment to either JIRA or submission in Gerrit.


was (Author: rnewton):
/me shakes fist at the color support

Would you mine attaching the patch? We typically don't accept inline patches, even one liners. The link between your license agreement and the patch in our system is based on the patch file attachment to either JIRA or submission in Gerrit.

> 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
>          Components: Core/General
>    Affects Versions: 11.20.0, 13.6.0
>            Reporter: Walter Doekes
>            Severity: Minor
>         Attachments: ASTERISK-25695_safe_asterisk_TERM.patch
>
>
> 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 (see {{ASTERISK-25695_safe_asterisk_TERM.patch}}):
> {noformat}
>         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
> {noformat}
> 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