search for: isusbdevice

Displaying 1 result from an estimated 1 matches for "isusbdevice".

2012 Sep 21
1
Detect if a drive is USB?
I'm updating a script to work with EL6 (previously worked on EL5) and am stumped, google fu is failing me. Part of the script is to detect USB drives and mount them. Previously, It worked something like isUsbDevice() { if [ -f /sys/block/$1/usb ] ; then // do stuff fi; } but I don't find the "usb" file/directory anywhere to be found any more on el6. I've tried the output of lsusb and lsusb -v but in no case have I been able to find anything there matching anything in /sys/block that...