This question seems so basic - I am almost embarrassed to ask it. A day of searching FAQs and other documents hasn't turned up very much so I thought I would ask here.
Arm-linux 2.4.21 running on a Cirrus SOC. Hotplug is enabled in the kernel and I would like to write a sbin/hotplug shell script that does: If this is a USB device if its a memory stick if (ACTION == add) mount it if (ACTION == remove) unmount it Grossly over-simplified of course My problem is, how the heck do I know this is a memory stick (flash drive) without knowing the vendor, model and revision of every one made? I tried printing out all the available environment variables from my script and I have plugged in 5 different flash drives and they all have an INTERFACE value of 0/0/0 whereas all the other devices (Bluetooth adaptor, 802.11 adaptor, mouse etc) have other values. So is testing for ${INTERFACE} = "0/0/0" an OK way to do this or am I fooling myself? Thanks for your help. Steve ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users