FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-25-2010, 08:42 AM
"T. Horsnell"
 
Default FC12 udev rules

Hi all,
I need to set up a custom rule to give me mode 666 on a custom USB device
(or on all the otherwise un-handled USB devices).
I used to do this (in FC9) by modifying ruleset 50-udev-default.rules at
the libusb entry (I know this was not the 'correct' way, but I could never
understand udev enough to work out what *was* the correct way).

Now that I've moved to FC12, this 50- rulest doesnt exist, and I cant find
where the libusb stuff is now handled. Can someone please tell me how to
correctly add a custom rule. Presumably I have to use a filename which causes
it to be executed in the right order. Does udev stop processing subsequent
rules files when it hits a rule which matches?

In ruleset 50-udev-default.rules I used to have:

###SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0666"

Thanks,
Terry




--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-25-2010, 01:56 PM
"Paul W. Frields"
 
Default FC12 udev rules

On Thu, Feb 25, 2010 at 09:42:15AM +0000, T. Horsnell wrote:
> Hi all,
> I need to set up a custom rule to give me mode 666 on a custom USB device
> (or on all the otherwise un-handled USB devices).
> I used to do this (in FC9) by modifying ruleset 50-udev-default.rules at
> the libusb entry (I know this was not the 'correct' way, but I could never
> understand udev enough to work out what *was* the correct way).
>
> Now that I've moved to FC12, this 50- rulest doesnt exist, and I cant find
> where the libusb stuff is now handled. Can someone please tell me how to
> correctly add a custom rule. Presumably I have to use a filename which causes
> it to be executed in the right order. Does udev stop processing subsequent
> rules files when it hits a rule which matches?
>
> In ruleset 50-udev-default.rules I used to have:
>
> ###SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
> SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0666"


That rule has moved into /lib/udev/rules.d/. And AFAIK udev reads all
rules in and evaluates all the matches in order. Honestly I'm not an
expert, so don't take this as gospel, but I'm pretty sure you have to
explicitly do something to make udev bail completely partway through
those evaluations.


--
Paul W. Frields http://paul.frields.org/
gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233 5906 ACDB C937 BD11 3717
http://redhat.com/ - - - - http://pfrields.fedorapeople.org/
Where open source multiplies: http://opensource.com
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-03-2010, 09:54 AM
"T. Horsnell"
 
Default FC12 udev rules

Paul W. Frields wrote:
> On Thu, Feb 25, 2010 at 09:42:15AM +0000, T. Horsnell wrote:
>> Hi all,
>> I need to set up a custom rule to give me mode 666 on a custom USB device
>> (or on all the otherwise un-handled USB devices).
>> I used to do this (in FC9) by modifying ruleset 50-udev-default.rules at
>> the libusb entry (I know this was not the 'correct' way, but I could never
>> understand udev enough to work out what *was* the correct way).
>>
>> Now that I've moved to FC12, this 50- rulest doesnt exist, and I cant find
>> where the libusb stuff is now handled. Can someone please tell me how to
>> correctly add a custom rule. Presumably I have to use a filename which causes
>> it to be executed in the right order. Does udev stop processing subsequent
>> rules files when it hits a rule which matches?
>>
>> In ruleset 50-udev-default.rules I used to have:
>>
>> ###SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
>> SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0666"
>
>
> That rule has moved into /lib/udev/rules.d/. And AFAIK udev reads all
> rules in and evaluates all the matches in order. Honestly I'm not an
> expert, so don't take this as gospel, but I'm pretty sure you have to
> explicitly do something to make udev bail completely partway through
> those evaluations.
>
>

Many thanks for that info. The file I need is right there in /lib/udev/rules.d.
But what is the stuff still in /etc/udev/rules.d/ used for I wonder...

Cheers,
Terry

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-03-2010, 12:28 PM
Patrick O'Callaghan
 
Default FC12 udev rules

On Wed, 2010-03-03 at 10:54 +0000, T. Horsnell wrote:
> > That rule has moved into /lib/udev/rules.d/. And AFAIK udev reads
> all
> > rules in and evaluates all the matches in order. Honestly I'm not
> an
> > expert, so don't take this as gospel, but I'm pretty sure you have
> to
> > explicitly do something to make udev bail completely partway through
> > those evaluations.
> >
> >
>
> Many thanks for that info. The file I need is right there
> in /lib/udev/rules.d.
> But what is the stuff still in /etc/udev/rules.d/ used for I wonder...

Take a look at udev(7), where it says:

The udev rules are read from the files located in the default rules directory /lib/udev/rules.d/, the custom rules directory
/etc/udev/rules.d/ and the temporary rules directory /dev/.udev/rules.d/. All rule files are sorted and processed in lexical
order, regardless in which of these directories they live.

IOW, RTFM :-)

poc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 03-03-2010, 12:49 PM
"T. Horsnell"
 
Default FC12 udev rules

Patrick O'Callaghan wrote:
> On Wed, 2010-03-03 at 10:54 +0000, T. Horsnell wrote:
>>> That rule has moved into /lib/udev/rules.d/. And AFAIK udev reads
>> all
>>> rules in and evaluates all the matches in order. Honestly I'm not
>> an
>>> expert, so don't take this as gospel, but I'm pretty sure you have
>> to
>>> explicitly do something to make udev bail completely partway through
>>> those evaluations.
>>>
>>>
>> Many thanks for that info. The file I need is right there
>> in /lib/udev/rules.d.
>> But what is the stuff still in /etc/udev/rules.d/ used for I wonder...
>
> Take a look at udev(7), where it says:
>
> The udev rules are read from the files located in the default rules directory /lib/udev/rules.d/, the custom rules directory
> /etc/udev/rules.d/ and the temporary rules directory /dev/.udev/rules.d/. All rule files are sorted and processed in lexical
> order, regardless in which of these directories they live.
>
> IOW, RTFM :-)
>
> poc
>

Thanks and apologies for being a timewaster!

Cheers,
Terry
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 04:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org