[asterisk-dev] different name for udev rules file?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Feb 10 06:56:31 MST 2007


Hi

On Sat, Feb 10, 2007 at 08:16:08PM +0800, Steve Underwood wrote:
> Tzafrir Cohen wrote:
> >On Sat, Feb 10, 2007 at 10:50:14AM +0800, Steve Underwood wrote:
> >  
> >>Tzafrir Cohen wrote:
> >>    
> >>>Hi
> >>>
> >>>I'm not sure that the name /etc/udev/rules.d/zaptel is a good one:
> >>>
> >>>http://bugs.digium.com/view.php?id=9015
> >>>
> >>>Any thoughts?
> >>>
> >>>/etc/udev/rules.d/50-zaptel.rules ?
> >>>
> >>> 
> >>>      
> >>On my system (FC6) 50 doesn't work. I have to name it 49-zaptel.rules
> >>    
> >
> >Looking at the contents of the Fedora Core 6 udev package:
> >
> >$ grep zap etc/udev/rules.d/50-udev.rules
> ># Section for zaptel device
> >KERNEL=="zapctl",               NAME="zap/ctl"
> >KERNEL=="zaptimer",             NAME="zap/timer"
> >KERNEL=="zapchannel",           NAME="zap/channel"
> >KERNEL=="zappseudo",            NAME="zap/pseudo"
> >KERNEL=="zap[0-9]*",            NAME="zap/%n"
> >
> >This is from udev-095-17.fc6.x86_64.rpm, see the link in th bug report.
> >
> >So Fedora has followed Debian in adding the zap udev rules to the base
> >udev package. It has also followed Debian in leaving out the permission
> >bits at first (Like Debian Sarge at the time, corrected in Etch. Not
> >sure about different Ubuntu versions).
> >  
> Ah, yes, that's right. That was why I had to add a usable file to FC6 as 
> 49-???, so it would be seen before that useless junk in 50-udev.rules. 
> So, I add a file 49-zaptel.rules, which contains
> 
> # zaptel devices with ownership/permissions for running as openpbx
> KERNEL=="zapctl", NAME="zap/ctl", OWNER="xxx", GROUP="xxx", MODE="0660", 
> OPTIONS="last_rule"
> KERNEL=="zaptimer", NAME="zap/timer", OWNER="xxx", GROUP="xxx", 
> MODE="0660", OPTIONS="last_rule"
> KERNEL=="zapchannel", NAME="zap/channel", OWNER="xxx", GROUP="xxx", 
> MODE="0660", OPTIONS="last_rule"
> KERNEL=="zappseudo", NAME="zap/pseudo", OWNER="xxx", GROUP="xxx", 
> MODE="0660", OPTIONS="last_rule"
> KERNEL=="zap[0-9]*", NAME="zap/%n", OWNER="xxx", GROUP="xxx", 
> MODE="0660", OPTIONS="last_rule"

Wow, what an overkill. Try just adding:

SUBSYSTEM=="zaptel", OWNER="xxx", GROUP="xxx"

For the record, On Debian there is just one extra line:

/etc/udev/rules.d/020_permissions.rules:SUBSYSTEM=="zaptel", GROUP="dialout"

In addition to the ones already in Fedora:

/etc/udev/rules.d/udev.rules:KERNEL=="zapctl",          NAME="zap/ctl"
/etc/udev/rules.d/udev.rules:KERNEL=="zaptimer",        NAME="zap/timer"
/etc/udev/rules.d/udev.rules:KERNEL=="zapchannel",      NAME="zap/channel"
/etc/udev/rules.d/udev.rules:KERNEL=="zappseudo",       NAME="zap/pseudo"
/etc/udev/rules.d/udev.rules:KERNEL=="zap[0-9]*",       NAME="zap/%n"

(In Debian the Zaptel devices are by default owned by root and in group
"dialout". The group "asterisk" is not good enough, because there may be
other zaptel clients.)

> 
> BUS!="usb", ACTION!="add", GOTO="zaptel_usb_add_end"
> 
> SYSFS{idVendor}=="e4e4", SYSFS{idProduct}=="11[345][01]", \
>      RUN+="/etc/hotplug/usb/xpp_fxloader udev 
> $sysfs{idVendor}/$sysfs{idProduct}/$sysfs{bcdDevice}"
> 
> LABEL="zaptel_usb_add_end"

Yeah, this is xpp/utils/xpp.rules . I forgot aout this one :-) .

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-dev mailing list