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

Steve Underwood steveu at coppice.org
Sat Feb 10 05:16:08 MST 2007


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"

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"

where xxx is the user I want to have own these devices.

Regards,
Steve



More information about the asterisk-dev mailing list