aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-17 17:06:47 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-17 17:06:47 +0000
commitbe65272c6c6129b95804262e12ec07075be0f7ef (patch)
treeb3e8a3b6553122984787f92aa851e2a705cfc9f5
parentaf258f8133f4163c44d3c7b07ff6a56e8ff42748 (diff)
Support color on certain platforms, even when started at boot (before TERM is set)
Closes issue #9048 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86119 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/term.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main/term.c b/main/term.c
index d051338d8..cb05a8f0f 100644
--- a/main/term.c
+++ b/main/term.c
@@ -80,8 +80,16 @@ int ast_term_init(void)
int termfd = -1, parseokay = 0, i;
if (!term)
+#ifdef linux
+ term = "linux";
+#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
+ term = "cons25";
+#elif defined(SOLARIS)
+ term = "sun-color";
+#else
return 0;
- if (!ast_opt_console || ast_opt_no_color || !ast_opt_no_fork)
+#endif
+ if (ast_opt_no_color)
return 0;
for (i=0 ;; i++) {