From Bugzilla Helper: User-Agent: Mozilla/5.0 Galeon/1.2.1 (X11; Linux i686; U;) Gecko/20020510 Description of problem: I have a USB drive that when plugged into a USB port gets detected by the kernel and setup automatically as sda via hotplug. I have been trying to piece together how hotplug is supposed to work all day. It is my understanding that the kernel calls /sbin/hotplug, hotplug calls the correct agent script(in this case usb.agent), usb.agent is supposed to load the correct module and call a script by the same name in /etc/hotplug/usb. Hotplug does seem to do everything but call the script, which is in my case usb-storage. I have tried setting up the correct line in /etc/hotplug/usb.usermap for my device, but that didn't seem to help and from what I read on the hotplug mailing list isn't required. I have tried turning on DEBUG=yes, which was helpful in understading how hotplug worked and making sure it was doing what I expect, but didn't help me figure it out. I also tried adding a blunt touch /tmp/foobar into my script to make sure that it was just exiting in some state that had not effect. I have also tried adding the contents of my /etc/hotplug/usb/usb-storage script directly into usb.agent in the right places. It works great that way, but that isn't the way hotplug is intended to work. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Install RedHat 7.3 2. Make sure hotplug is installed, and if not install it 3. Create a script in /etc/hotplug/usb called usb-storage to do some function when adding or removing 4. Make the script executable 5. Plug in a USB Mass Storage device Actual Results: /sbin/hotplug is called by the kernel. Hotplug calls /etc/hotplug/usb.agent. usb.agent loads the module usb-storage. /etc/hotplug/usb/usb-storage IS NOT called by usb.agent. Expected Results: /sbin/hotplug is called by the kernel. Hotplug calls /etc/hotplug/usb.agent. usb.agent loads the module usb-storage. /etc/hotplug/usb/usb-storage IS called by usb.agent. Additional info: The reason I need the script is that the scsi subsystem doesn't automatically remove devices from it's list in /proc/scsi/scsi when they are removed. So I need a script that will add the device to /proc/scsi/scsi on plug in if it is the second time since last boot that the device has been plugged in. The first time it adds it automatically. I also need the script to remove the device from /proc/scsi/scsi when the device is unplugged.
Closing really old bug