Automount does that...
This may be more than you wanted, but it works and once accustom to doing it this way>>>It's not so bad.
Check your usb flash name with:
my sandisk example:
Code:
Bus 003 Device 005: ID 0781:540e SanDisk Corp. Cruzer Contour Flash Drive
Now i know my sandisk is on bus 003 and device 005
We have to check your usb bus and port number with:
Code:
lsusb -t
Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 5: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
Now we know that bus 3 device 5 is on port 5 so we can go to :
Code:
cd /sys/bus/usb/drivers/usb
and disable the port:
Code:
sudo tee unbind <<< "3-5"
To enable port:
Code:
sudo tee bind <<< "3-5"
Good Luck
Bookmarks