linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Clarification on /etc/udev/rules.d processing
@ 2004-04-21  3:59 Kevin P. Fleming
  2004-04-21 10:09 ` Kay Sievers
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kevin P. Fleming @ 2004-04-21  3:59 UTC (permalink / raw)
  To: linux-hotplug

I've just started using udev, and I've decided I'd much rather have 
individual config files for various purposes in /etc/udev/rules.d rather 
than one combined file.

 From my reading of the code, it appears that udev always reads all the 
files in that directory (which is good), and they are read in readdir() 
order which should mean I can control the order by using alphanumeric 
sorting of the names (also good).

What I'm not clear on is how udev will handle multiple rules that match 
for a given device: if more than one rule wants to provide a device 
name, I presume udev will stop looking for device name rules as soon as 
any rules matches, right? In spite of that, rules that add symlinks to a 
device seem to always be processed even if they appear in the file after 
the rule that supplied the device name. I think this is the correct 
behavior, but I want to make sure it's the _expected_ behavior, not just
"unspecified behavior" that could change at any time.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clarification on /etc/udev/rules.d processing
  2004-04-21  3:59 Clarification on /etc/udev/rules.d processing Kevin P. Fleming
@ 2004-04-21 10:09 ` Kay Sievers
  2004-04-21 14:20 ` Kevin P. Fleming
  2004-04-21 16:08 ` Marco d'Itri
  2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2004-04-21 10:09 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Apr 20, 2004 at 08:59:03PM -0700, Kevin P. Fleming wrote:
> I've just started using udev, and I've decided I'd much rather have 
> individual config files for various purposes in /etc/udev/rules.d rather 
> than one combined file.
> 
> From my reading of the code, it appears that udev always reads all the 
> files in that directory (which is good), and they are read in readdir() 
> order which should mean I can control the order by using alphanumeric 
> sorting of the names (also good).
> 
> What I'm not clear on is how udev will handle multiple rules that match 
> for a given device: if more than one rule wants to provide a device 
> name, I presume udev will stop looking for device name rules as soon as 
> any rules matches, right?

Yes.

> In spite of that, rules that add symlinks to a 
> device seem to always be processed even if they appear in the file after 
> the rule that supplied the device name.

No, if NAME is set by a rule, the processing is stopped. No later
"symlink only" rule will be applied.

thanks,
Kay


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clarification on /etc/udev/rules.d processing
  2004-04-21  3:59 Clarification on /etc/udev/rules.d processing Kevin P. Fleming
  2004-04-21 10:09 ` Kay Sievers
@ 2004-04-21 14:20 ` Kevin P. Fleming
  2004-04-21 16:08 ` Marco d'Itri
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin P. Fleming @ 2004-04-21 14:20 UTC (permalink / raw)
  To: linux-hotplug

Kay Sievers wrote:

> No, if NAME is set by a rule, the processing is stopped. No later
> "symlink only" rule will be applied.

Any chance that behavior could be changed? For example, the current udev 
default rules file creates

/dev/device-mapper

for the device mapper control device. However, the recent standard 
location for that is

/dev/mapper/control

It is simple enough to create a SYMLINK rule to create this node, and it 
works fine. However, when using multiple rules files (in 
/etc/udev/rules.d), I'll have to ensure that the file containing my 
SYMLINK rule always gets processed before the one containing the NAME 
rule. I can do that, but it seems an unnecessary restriction.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Clarification on /etc/udev/rules.d processing
  2004-04-21  3:59 Clarification on /etc/udev/rules.d processing Kevin P. Fleming
  2004-04-21 10:09 ` Kay Sievers
  2004-04-21 14:20 ` Kevin P. Fleming
@ 2004-04-21 16:08 ` Marco d'Itri
  2 siblings, 0 replies; 4+ messages in thread
From: Marco d'Itri @ 2004-04-21 16:08 UTC (permalink / raw)
  To: linux-hotplug

On Apr 21, "Kevin P. Fleming" <kpfleming@backtobasicsmgmt.com> wrote:

> /etc/udev/rules.d), I'll have to ensure that the file containing my 
> SYMLINK rule always gets processed before the one containing the NAME 
> rule. I can do that, but it seems an unnecessary restriction.
Agreed, this is very annoying.

-- 
ciao, |
Marco | [5877 sev.CLHBjFpPY]


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-21 16:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-21  3:59 Clarification on /etc/udev/rules.d processing Kevin P. Fleming
2004-04-21 10:09 ` Kay Sievers
2004-04-21 14:20 ` Kevin P. Fleming
2004-04-21 16:08 ` Marco d'Itri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).