#!/bin/bash

# Used to initially load the driver
# ALSO used to make changes the USB storage made by the Pi visible to the host on the other side of the USB cable

# remove driver.  Doesn't hurt if driver has not yet been installed
modprobe -r g_mass_storage

# install USB driver.  This causes the host to recognize the USB partitions
modprobe g_mass_storage file=/usbdata stall=0 ro=0 removable=1  idVendor=0x0781 idProduct=0x5572 bcdDevice=0x0126 iManufacturer="SanDisk"  iProduct="Cruzer Switch"

echo USB drivers added
