Yep, got that bit working by realising the obvious from looking at the usb.usermap file. The first field in the map file is the match_flags, which tells usbmodules which bits of the usb id to match. I set to match the vendor ID and something else and then I managed to get a match but....Erich Schulz wrote:
usbmodules can be told to return the matching value in the /etc/hotplug/usb.usermap file. But I don't know how to extract the values from the lsusb or usbview data, into the format of usb.usermap file to give me a match
Does anything at all happen when you plug it in?
There is a problem with the load_modules function in the hotplug.functions file. Basically the same function is called with the different type of device maps, firstly it looks for kernel modules, then the other maps. This is all very sensible, except that the same function is called for all of the maps means that the name spaces collide. If any of the scripts that you want to run have the same name as the kernel modules, they wont run because the load_drivers module always checks for loadable kernel modules first, even if it was called with one of the other maps, and then exits the case statement.
The easy fix was to write a new script which called the usb-storage perl script plus some debug messages. The correct thing is to rewrite load_drivers to not check the loadable modules when called with the usb.usermap. I'll send a patch to the developers and see if they flame me.
The perl-script that you told me about now runs and sets up the entry into the fstab file and mounts the drive, an icon appears on my desktop, which I am fairly sure is the gnome system interacting with the fstab entry.
BUT......
I can't unmount it. I always get a "device busy" message. This happens wether I call the perl script or I mount it manually as root. I suspect tha problem lies with the kernel module called up when the stick is plugged in. This has to attach the usb stick to the scsi drives.
More digging.
Cheers
Erich
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
