From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 15 Apr 2004 00:25:04 +0000 Subject: udev autoruler for persistent device naming? Message-Id: <20040415002504.GB8818@vrfy.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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_id70&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