Greetings. After spending some hours rewriting my init scripts in the rage because some assholes decided to move /lib/firmware to /usr/lib/firmware, here’s my answer:
On Fri, 18 May 2012 18:28:44 +0200 Denys Vlasenko <[email protected]> wrote: > (1) what if devname itself has slashes? Like this: > ACTION=add > BUSNUM=001 > DEVICE=/proc/bus/usb/001/003 > DEVNAME=bus/usb/001/003 <============ !!! > DEVNUM=003 > DEVPATH=/devices/pci0000:00/0000:00:02.1/usb1/1-5 > DEVTYPE=usb_device > MAJOR=189 > MINOR=2 > PRODUCT=18d1/4e12/227 > SUBSYSTEM=usb > TYPE=0/0/0 The examples you mentioned are only rarely executed, so they could easi‐ ly replaced with: $SUBSYSTEM=scsi root:disk 660 @/lib/mdev/scsidev Then the environment is handled in that script. Mdev would need to ex‐ port the variables of course. > (2) Why do we special-case subsystem check like this? > What if someone wants to check something else? > > Take a look at this real-world hotplug invocation: > ACTION=add > DEVPATH=/devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5:1.0/host5/target5:0:0 > DEVTYPE=scsi_target > SUBSYSTEM=scsi > > What if someone needs to match "scsi_target" devtype? How to do it? > > See the problem? As mentioned above, I don’t see any need to make mdev more complex be‐ cause of a small set of corner‐cases. Removing the special case of the SUBSYSTEM/DEVNAME match would remove the concerns. Simply exporting all variables the kernel gives back would only require mdev.conf rewrites, if the kernel scheme would change to something completely ugly in the future. Sincerely, Christoph Lohmann _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
