[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: removal of support for /etc/hotplug/usb/

On Oct 10, Shaun Jackman <sjackman@gmail.com> wrote:

(I hope this fully covers the changes needed.)

> The udev rule I've written for the Creative Labs Nomad Jukebox looks like this:
> SYSFS{modalias}="usb:v0471p0222*", NAME="njb%n", GROUP="audio", MODE="0666"

It would work, but is wrong. If it were a block device you could use:

BUS=="usb", SYSFS{idVendor}=="0471", SYSFS{idProduct}=="0222", \
	SYMLINK+="njb%n", GROUP="audio"

(There is no point in changing the group of a world-writeable device,
and the default is MODE="0660".)

> When I plug the device in, the node doesn't actually seem to be created though:
> $ find /dev /sys -name \njb*
> $

But it appears that your package is an user space driver which uses
libusb and the /proc/bus/usb/ interface:

> I would like the /proc/bus/usb node to be symlinked to /dev/njb%d,
> with the correct permissions applied, as well as loading the "fuse"
> kernel module. Is this possible?

There is no point in creating symlinks, because libusb does not care.
The current kernels only provide the /proc/bus/usb/ interface, so you
still need to use a script to change the file permissions:

ACTION=="add", BUS=="usb", SYSFS{idVendor}=="0471", SYSFS{idProduct}=="0222", \

2.6.14 kernels will provide real devices in /dev/bus/usb/, and udev will
be able to directly change their permissions:

SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0471", SYSFS{idProduct}=="0222", \

I do not know what the fuse kernel driver is, but usually drivers
provide a module alias to be matched against the $MODALIAS value
provided by hotplug so they can be automatically loaded.
If they need special handling you can just add a RUN rule (do not forget
to match them on ACTION=="add").


Attachment: signature.asc
Description: Digital signature

Reply to: