linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* incomplete doc questions
@ 2005-07-29 14:36 elkner
  2005-07-30  0:07 ` Kay Sievers
  2005-07-30 15:24 ` Jens Elkner
  0 siblings, 2 replies; 3+ messages in thread
From: elkner @ 2005-07-29 14:36 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I#m just starting to get into touch with udev - sounds amazing (at least
from the docs I've read ;-)). So I installed the 12.6.3 vanilla kernel as
well as udev-064 on a (in general slackware like) machine. Since I never
used hotplug stuff, there is no hotplug stuff at all on any of the machines
in my admin territory (but since more and more usb and firewire stuff comes
in, I think, udev should/will do the job ...).

But unfortunately I miss some tiny details in the docs (incl. manpages),
which are essential to be able to get udev work as I expect it.

1) Setup:
   How should udev be activated (via /proc/sys/kernel/hotplug)?
   As /sbin/udev (as the README, LinuxHelp_UDEVPrimer says) or
   as /sbin/udevsend ? From reading the man pages, the latter would 
   make more sense to me, since udevsend uses udevd for ordering
   the events, and than udevd invokes udev (If I understood this right).
   Hmmm, but wait, can you show/construct a scenario, why/where it is
   important to have the events ordered ?

2) Rule Matching - who wins:
   writing_udev_rules says "udev will stop processing rules as soon as it
   finds a matching rule in a file for the new item of hardware that has
   been detected" (i.e. first match wins).
   The manpage (actually man page is the source I consider to have the last
   word) says "If all keys are matching, the rule will be  applied and the
   name is used to name the device file or the network interface." (i.e.
   every match wins). 
   But in the RELEASE-NOTES I found "All rules are applied now, but only
   the first matching rule with a NAME-key will be applied. All later rules
   with NAME-key are completely ignored." (i.e. only the first matching
   rule wins, which has a NAME="..." part).
   
   Looking at the examples in etc/* none of the statements above can be
   true (otherwise the example have at least a lot of useless rules). So
   I guess:

   Every matching rule, which does not assign a value to the NAME key or
   removes the value from the NAME key wins as well as the first matching
   rule, which assigns a value to the NAME key. And thus, all later
   matching rules, which want to assign a second time a value to the NAME
   key, are completely ignored. E.g.:
   KERNEL="hdc",      NAME="%k", GROUP="disk"
   KERNEL="hdc",      NAME="%k", SYMLINK+="cdrom0"
   would create something like
   "brw-r-----  1 root disk 22, 0 May  8  1995 /dev/hdc"
   but NOT a symlink from /dev/cdrom0 to /dev/hdc .

   Is this right ?

3) Matching rules - when applied:
   At least for me, it is not really clear, when the rules will be applied.
   As soon as a rules matches or at the end of the rule parsing "process"?
   E.g.
   KERNEL="hdc", GROUP="disk"
   KERNEL="hdc", GROUP="sys"
   in the first case, chmod would be called twice, in the latter case I
   would assume only once... Another example, where this would be important
   is:
   KERNEL="hdc", SYMLINK+="cdrom0"
   KERNEL="hdc", SYMLINK:="cdrom"

And last but not least, is it planned, to have matching rules for major/minor
numbers. E.g. MAJOR="b2" , GROUP="floppy" or MAJOR="c9|c27", GROUP="tape" ?

Regards,
jens.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2005-07-30 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-29 14:36 incomplete doc questions elkner
2005-07-30  0:07 ` Kay Sievers
2005-07-30 15:24 ` Jens Elkner

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).