Robert Michel
2006-Jul-04 13:10 UTC
[Asterisk-Users] vserver with no /dev/tty* how to run "asterisk -c" for a colored CLI?
Salve *! Since 6 month I enjoy runing asterisk on a vserver. Vserver does have one handycap - as root@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@guest on a vserver, you have the power to remove devices, but not the right to create them!
Robert Michel
2006-Jul-04 16:19 UTC
[Asterisk-Users] Re: vserver with no /dev/tty* how to run "asterisk -c" for a colored CLI?
Salve *! It seems that my mail took hours to become published on this list.... Inbetween I found a solution - on my vserser are some pseudo terminals #ls -lh /dev/pts crw--w---- 1 root tty 136, 14 2006-07-04 17:39 14 crw--w---- 1 root tty 136, 20 2006-07-05 01:04 20 crw------- 1 root tty 136, 21 2006-07-05 01:04 21 crw------- 1 root tty 136, 30 2006-07-05 00:53 30 crw--w---- 1 root tty 136, 31 2006-07-04 17:45 31 crw--w---- 1 root tty 136, 32 2006-07-04 17:45 32 crw------- 1 root tty 136, 4 2006-07-05 01:07 4 with ln -s /dev/pts/20 /dev/tty9 I got a terminal for asterisk *g* and now I have a colored CLI running :)) Greetings, rob Robert Michel schrieb am Dienstag, den 04. Juli 2006 um 22:10h:> Salve *! > > Since 6 month I enjoy runing asterisk on a vserver. > Vserver does have one handycap - as root@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@guest on a vserver, > you have the power to remove devices, but not the > right to create them! > >
Tzafrir Cohen
2006-Jul-04 22:32 UTC
[Asterisk-Users] Re: vserver with no /dev/tty* how to run "asterisk -c" for a colored CLI?
On Wed, Jul 05, 2006 at 01:19:35AM +0200, Robert Michel wrote:> Salve *! > > It seems that my mail took hours to become published on this > list.... > > Inbetween I found a solution - on my vserser are some > pseudo terminals > #ls -lh /dev/pts > > crw--w---- 1 root tty 136, 14 2006-07-04 17:39 14 > crw--w---- 1 root tty 136, 20 2006-07-05 01:04 20 > crw------- 1 root tty 136, 21 2006-07-05 01:04 21 > crw------- 1 root tty 136, 30 2006-07-05 00:53 30 > crw--w---- 1 root tty 136, 31 2006-07-04 17:45 31 > crw--w---- 1 root tty 136, 32 2006-07-04 17:45 32 > crw------- 1 root tty 136, 4 2006-07-05 01:07 4 > > with > ln -s /dev/pts/20 /dev/tty9 > I got a terminal for asterisk *g* and now I have > a colored CLI running :))But how are you going to guarantee /dev/pts/26 will exist? Specifically: what happens when you end your current ssh session? -- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 tzafrir.cohen@xorcom.com http://www.xorcom.com