[Asterisk-Users] Linux Kernel 2.6 Questions - safe_asterisk and
udev
Kevin P. Fleming
kpfleming at starnetworks.us
Sun Nov 14 20:38:02 MST 2004
Matt Gibson wrote:
> 1. Has anyone set asterisk up successfully with kernel 2.6 and running
> it as a user as opposed to root? - So far I have noticed that because of
> the udev file system, I have to manually chown /dev/zap /dev/sound et
> all to asterisk user upon boot up in rc.local. Is there a cleaner way of
> doing this?
Yes, read the udev documentation. You can control the permissions of any
device node it creates using simple entries in its configuration files.
> 2. I've also noticed that in rc.local I had to add a sleep 10 statement
> after inserting the modules to ensure that /dev/zap was created before
> running asterisk. Else asterisk would fail. Mind you this is running on
> a k6-350 with 320 megs of ram, so it could be the speed of the box, just
> wondering if anyone else noticed this.
True. Device node creation is not synchronous with module loading in
2.6, the way it was in 2.4. You should not use a sleep statement,
though, you should use a loop that waits until /dev/zap is created, at
least for now. To do this properly requires using hotplug-driven
scripts, but Asterisk is not currently capable of dealing with that.
More information about the asterisk-users
mailing list