Re: udev: how to do it right?
On Mon, Apr 12, 2004 at 12:34:09AM -0700, John L Fjellstad wrote:
> Antonio Rodriguez <arodriguez31@cfl.rr.com> writes:
>
> > hpd:/home/tony# ls /usr/local/bin/lsbus
> > ls: /usr/local/bin/lsbus: No such file or directory
> > hpd:/home/tony# ls /usr/local/bin/systool
> > ls: /usr/local/bin/systool: No such file or directory
>
> Debian packages will never install stuff in /usr/local/bin. If any
> documentation mentions /usr/local, then it's presumed that you have
> compiled by hand. Otherwise, the binaries will always be in /usr/bin.
>
> I looked through the documentation mentioned, and it makes some mistakes
> (mostly stuff that has been deprecated in never udev).
>
> For instance, memorystick isn't necessary a scsi device. At my place,
> it's a USB device:
>
> Device = "3-1"
> Device path = "/sys/devices/pci0000:00/0000:00:1d.2/usb3/3-1"
> bConfigurationValue = "1"
> bDeviceClass = "00"
> bDeviceProtocol = "00"
> bDeviceSubClass = "00"
> bMaxPower = "200mA"
> bNumConfigurations = "1"
> bNumInterfaces = " 1"
> bcdDevice = "0140"
> bmAttributes = "c0"
> detach_state = "0"
> idProduct = "0069"
> idVendor = "054c"
> manufacturer = "Sony"
> product = "USB Memory Stick Slot"
> speed = "12"
>
> The udev rule I would create for this would be
> BUS="usb", SYSFS{manufacturer}="Sony", SYSFS{product}="USB Memory Stick\
> Slot", NAME{all_partitions}="Memstick"
>
> Note that the format has changed a little (the old format is deprecated,
> and was totally removed starting with version 023).
>
> Also, note the {all_partitions} attribute in NAME. There was a problem
> with the node (ie memstick1) not beging created unless it is accessed,
> but it can't be accessed without being created. So, the all_partitions
> attribute was created to statically create the nodes.
>
> --
> John L. Fjellstad
> web: http://www.fjellstad.org/ Quis custodiet ipsos custodes
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
John, could you provide pointers to the documentation? I wan to
understand all this before asking more questions. I would like to know
how to identify my memstick in /sys for example.
Thankyou
Reply to: