[asterisk-bugs] [JIRA] (ASTERISK-25695) safe_asterisk -c breaks color in asterisk -r because of missing TERM for /dev/tty.
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Thu Jan 14 07:05:33 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-25695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rusty Newton updated ASTERISK-25695:
------------------------------------
Affects Version/s: 11.20.0
13.6.0
> 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
>
> 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