[Asterisk-Users] vserver with no /dev/tty* how to run "asterisk -c" for a colored CLI?

Robert Michel news at robertmichel.de
Tue Jul 4 13:10:12 MST 2006


Salve *!

Since 6 month I enjoy runing asterisk on a vserver.
Vserver does have one handycap - as root at guest  can't
you create devices - you can only remove them (without
a chance to restore them yourself...)

When I start asterisk -gcvvvv by hand I got a colored
CLI, but when I use init.d it is only monocrom.

Could be that I had once a /dev/tty1, now I have to
live without one.... (OK, I could ask the ISP for a
recovery - but every vserver is different, there could
be a use to know how to run "asterisk -c" without
a TTY or fake TTY.

I use Debian with asterisk/testing (1.2.7.1)
/etc/init.d/asterisk calls
/usr/sbin/safe_asterisk

inside vi /usr/sbin/safe_asterisk
#TTY=9  is comment out

So I do want to have a colored CLI, i change line 52
of /etc/init.d/asterisk
PARAMS="$PARAMS -U $USER"
PARAMS="$PARAMS -r -U $USER"

This gives me a colord CLI, also for other asterisk -rcvvv
conections :))))
BUT...
I have a heavy repeating warning:
 Use EXIT or QUIT to exit the asterisk console
 Use EXIT or QUIT to exit the asterisk console
 Use EXIT or QUIT to exit the asterisk console
 ...

 hmmmmmm

 This is a dirty solution - not good....

I tried to link a tty9 to /dev/null - but it seems
that aterisk is also reading from /dev/null - so
that's no solution...

I fear that "asterisk -c" does need a tty 
and asterisk CLI is switched to ansi colored CLI
only with "-c" right?
So without a TTY (And I think I can't creat a
dummy TTY on a vserver) I will have no chance
to have a colored TTY - right?

Or does anybody knows a trick?  ^ ^

Would be more easy to have a option "-C" 
just to have ansi color support ;)

Greetings,
rob



PS: Of course it could be my fault that *I* maybe
had removed an existing tty - but there is no
garantee that all vserver does have a tty :)
And remember when you are root at guest on a vserver,
you have the power to remove devices, but not the
right to create them!





More information about the asterisk-users mailing list