Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 114072

Summary: configuring options in /etc/conf.d/asterisk prevent to start asterisk in daemon mode
Product: Gentoo Linux Reporter: Christophe PEREZ <chris>
Component: Current packagesAssignee: voip herd (OBSOLETE) <voip+disabled>
Status: RESOLVED CANTFIX    
Severity: normal CC: rockoo
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Christophe PEREZ 2005-11-30 14:37:56 UTC
I wanted to start asterisk with verbose options.
I modified /etc/conf.d/asterisk :
ASTERISK_OPTS="-vvv"
But, at start, asterisk is really verbose at screen, just CLI should show the
logs, and it is not started as a daemon.

The same thing with -c (console) option.

So, I can start CLI with "asterisk -vvvc", but I no color in logs, as I should have.

On asterisk forum, they told me to add :
export TERM=vt100
to init script, but no more color.

They ask me :
"i think perhaps asterisk has to run on a TTY to get color?"

I don't really know more.

Reproducible: Always
Steps to Reproduce:
1.# grep OPT /etc/conf.d/asterisk
ASTERISK_OPTS="-vvv"

2.# /etc/init.d/asterisk start
Comment 1 Stefan Knoblich (RETIRED) gentoo-dev 2005-11-30 16:59:24 UTC
1. asterisk-1.0.x doesn't have colours in the cli, that's a feature of 1.2.x  
  
2. _don't_ use cli mode with the init script, having a cli open and trying  
   to run in daemon mode defeats the purpose of being a daemon for every  
   service out there... (unless redirected to another tty, which of course  
   is a potential security issue)  
  
   cli mode is for debugging problems only  
 
   use asterisk -r to connect to an already running asterisk daemon 
  
  
  
  
Comment 2 Christophe PEREZ 2005-11-30 18:23:49 UTC
> 1. asterisk-1.0.x doesn't have colours in the cli, that's a feature of 1.2.x  

Oh, sorry, I've forgot to precise version.
I use net-misc/asterisk-1.2.0
  
> 2. _don't_ use cli mode with the init script, having a cli open and trying  
>   to run in daemon mode defeats the purpose of being a daemon for every  
>  service out there... (unless redirected to another tty, which of course  
>  is a potential security issue)  
> 
>  cli mode is for debugging problems only

ok

>  use asterisk -r to connect to an already running asterisk daemon 

That's what I do, and I have a "shell" called "CLI>". So, I said "cli" for that.
And I have no color in it.


And, before to use asterisk under gentoo, I used it with asterisk@home / CentOS,
and I had colors in the "CLI>".
That's why I miss them ;-)

Also, did you try to start asterisk with options in ASTERISK_OPTS="" ?
asterisk doesn't start as a daemon.
That's really a bug, so I reopen it.
  
Comment 3 Stefan Knoblich (RETIRED) gentoo-dev 2005-11-30 18:51:46 UTC
man asterisk: 
 
       -v     Increase the level of verboseness on the console.  The more times     
              -v is specified, the more verbose the output is. 
              Specifying this option implies -f and will cause asterisk to no 
              longer fork or  detach  from  the controlling terminal.  This 
              option may also be used in conjunction with -r and -R. 
 
              Note: This always sets the verbose level in the asterisk process,  
              even if it is running  in  the background. This will affect the 
              size of your log files. 
 
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2006-10-03 04:08:24 UTC
no idea how to fix this - but you can easily use "asterisk -vvvvc" in a screen instead of the init script. Please reopen when you got a solution!