From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 09 Mar 2004 22:40:24 +0000 Subject: Re: usb-storage Message-Id: <20040309224024.GA12965@kroah.com> List-Id: References: <404DFA8B.6080608@libero.it> In-Reply-To: <404DFA8B.6080608@libero.it> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Mar 09, 2004 at 11:12:54PM +0100, Luca T. wrote: > Ok, > as Greg suggested the script is fired only the first time an usb-disk is > plugged in. > I verified this by unloading the usb-storage kernel module and then > plugging in an usb-disk. The script has been executed correctly. > Now, i need a way to detect when an usb-disk is plugged in and out, not > only the first time, but everytime this happens. You will get a scsi event every time this happens, but this is only in the 2.6 kernel. 2.4 does not support this. > I noticed that not only the usb-storage module isn't unloaded when the > usb-disk is removed but it also leaves the device-file (for instance > /dev/sda). So i have no way to know when the disk is removed :( Only udev manages the /dev entries, unless you are using devfs. I'm guessing you aren't using udev or devfs? If so, the device nodes are always there. Hope this helps, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel