linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev autoruler for persistent device naming?
@ 2004-04-15  0:25 Kay Sievers
  2004-04-15  6:43 ` Martin Schwenke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kay Sievers @ 2004-04-15  0:25 UTC (permalink / raw)
  To: linux-hotplug

I need to ask for your comment on an idea:

With udev, anybody capable reading documentation and execute commands in
a shell, should be able to uniquely name the connected devices.
But if you don't have a rule for every device, you stick with the old
problem, that the device name depends on the order of discover. To use
persistent names for udev, we may plug a small program as a udev callout
in udev.rules for devices not catched by any other rule:

  KERNEL="sd*[1-4]", PROGRAM="/sbin/udev_autoruler", NAME="%c", USER="$local"

this 'udev_autoruler' thing examines the device, guesses what it looks
like (like kudzu) and creates a rule with unique device attributes, like the
serial number and the unique NAME for the node.
The CALLOUT will place this rule in a file in /etc/udev/rules.d/ The same
name is returned to udev to actually name the node. If the device is reconnected
anytime later, this new rule will match it and assignes the same name forever.


Hmm, I don't know, if I really like the idea myself :)
But, what do you think?

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-15  0:25 udev autoruler for persistent device naming? Kay Sievers
2004-04-15  6:43 ` Martin Schwenke
2004-04-15 12:20 ` Kay Sievers
2004-04-16  6:40 ` Martin Schwenke

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