Difference between revisions of "Talk:Map Custom Device Entries with udev"

From ArchWiki
Jump to: navigation, search
(confusion about rules - partitioned devices)
m (rm closed discussions, redirect)
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Hi there, I often thought about changing this, but I'm not sure yet. This article suggests two rules for a task which only requires one rule. There has also been confusion about this on the forums. Example:
#REDIRECT [[Talk:Udev]]
# Symlink multi-part device
BUS=="usb", SYSFS{serial}=="1730C13B18000B84", KERNEL=="sd?", NAME="%k", SYMLINK+="usbdisk", GROUP="storage"
BUS=="usb", SYSFS{serial}=="1730C13B18000B84", KERNEL=="sd?[1-9]", NAME="%k", SYMLINK+="usbdisk%n", GROUP="storage"
This can be done by one single rule (it works here, at least), like this:
BUS=="usb", SYSFS{serial}=="1730C13B18000B84", KERNEL=="sd*", NAME="%k", SYMLINK+="usbdisk%n", GROUP="storage"
Also, for simplicity, you can omit the GROUP and NAME statements, because they are already set in udev.rules, so the rule would be
BUS=="usb", SYSFS{serial}=="1730C13B18000B84", KERNEL=="sd*", SYMLINK+="usbdisk%n"
This rule will create usbdisk, usbdisk1, usbdisk2 etc. and it will leave NAME and GROUP to the defaults set in udev.rules.
Is there a reason that the wiki page suggests 2 rules here and adds redundancy to GROUP and NAME statements? Does anyone know a case where this doesn't work? [[User:Brain0|brain0]] 09:49, 19 December 2005 (EST)

Latest revision as of 16:03, 12 September 2013

Redirect to: