On Tue, Jul 04, 2006 at 05:10:35PM +0200, Robert Michel wrote:
> Salve *!
> 
> I'm using asterisk for a while and now I want to have a colord CLI.
> I have apt-get install asterisk/testing, that is asterisk 1.2.7.1
> 
> I use Debian stable/testing on a vserver with any /dev/tty*.
> So, of course, I comment out "#TTY=9" inside /usr/sbin/safe_asterisk.

safe_asterisk has a flawed logic: it assumes that the tty device will
always exist. Thus it is not suited for use with screen.

However wouldn't it be better to tell asterisk to have colors even in a
remote terminal unless you use -n?

See attached patch for a possible route. I don't remember if I tested
it, though.

-- 
Tzafrir Cohen      sip:[EMAIL PROTECTED]
icq#16849755       iax:[EMAIL PROTECTED]
+972-50-7952406           
[EMAIL PROTECTED]  http://www.xorcom.com
#! /bin/sh /usr/share/dpatch/dpatch-run
## remote_color.dpatch by Tzafrir Cohen <[EMAIL PROTECTED]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Make Asterisk's terminal use colors by default. Doesn't work

@DPATCH@
diff -urNad asterisk-1.2.7.1.dfsg/term.c 
/tmp/dpep.2czPCU/asterisk-1.2.7.1.dfsg/term.c
--- asterisk-1.2.7.1.dfsg/term.c        2005-11-29 20:24:39.000000000 +0200
+++ /tmp/dpep.2czPCU/asterisk-1.2.7.1.dfsg/term.c       2006-05-13 
19:05:50.209354595 +0300
@@ -78,9 +78,11 @@
        char buffer[512] = "";
        int termfd = -1, parseokay = 0, i;
 
+       if (! option_nofork) /* if we daemonize, our terminal is irrelevant */
+               term = "xterm";
        if (!term)
                return 0;
-       if (!option_console || option_nocolor || !option_nofork)
+       if (option_nocolor)
                return 0;
 
        for (i=0 ;; i++) {
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to