Support color on certain platforms, even when started at boot (before TERM is set)
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 17 Oct 2007 17:06:47 +0000 (17:06 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 17 Oct 2007 17:06:47 +0000 (17:06 +0000)
Closes issue #9048

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86119 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/term.c

index d051338..cb05a8f 100644 (file)
@@ -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++) {