[asterisk-dev] [Code Review] set ASTVARRUNDIR=$(localstatedir)/run/asterisk as default path

Michiel van Baak michiel at vanbaak.info
Sat Feb 21 05:28:25 CST 2009


On 12:59, Sat 21 Feb 09, Tzafrir Cohen wrote:
> On Sat, Feb 21, 2009 at 10:51:10AM -0000, Michiel van Baak wrote:
> > 
> > 
> > > On 2009-02-11 09:11:32, Matthew Nicholson wrote:
> > > > trunk/contrib/scripts/safe_asterisk, lines 95-98
> > > > <http://reviewboard.digium.com/r/139/diff/1/?file=2507#file2507line95>
> > > >
> > > >     Perhaps this should be done at install time instead of here.
> > > 
> > >  wrote:
> > >     It looks like this is done at install time.  It seems redundant to have it here to.
> > 
> > We need to do this because /var/run is wiped on reboot.
> 
> Likewise, safe_asterisk is the wrong place. safe_asterisk is run as user
> asterisk by the init.d script (if at all). It should be done in the
> init.d script.

Only on systems with init.d
On my OpenBSD machine safe_asterisk is run as root and because asterisk
is build with the --with-user and --with-group it drops to this user
itself.

The init.d scripts are patched as well, so this is not an issue I think.
The init.d script creates and chmods the dir, so the check in
safe_asterisk finds the directory there and does not execute the mkdir
and chmod.

> 
> -- 
>                Tzafrir Cohen
> icq#16849755              jabber:tzafrir.cohen at xorcom.com
> +972-50-7952406           mailto:tzafrir.cohen at xorcom.com
> http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev

-- 

Michiel van Baak
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer aficionados are both called users?"




More information about the asterisk-dev mailing list