2017-04-02 03:02:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Mount a USB device
|
|
|
|
die() { echo >&2 "!!!!! $@"; exit 1; }
|
|
|
|
|
|
|
|
if ! lsmod | grep -q ehci_hcd; then
|
|
|
|
insmod /lib/modules/ehci-hcd.ko \
|
|
|
|
|| die "ehci_hcd: module load failed"
|
|
|
|
fi
|
|
|
|
if ! lsmod | grep -q ehci_pci; then
|
|
|
|
insmod /lib/modules/ehci-pci.ko \
|
|
|
|
|| die "ehci_pci: module load failed"
|
|
|
|
fi
|
2017-04-03 21:09:54 +00:00
|
|
|
if ! lsmod | grep -q xhci_hcd; then
|
|
|
|
insmod /lib/modules/xhci-hcd.ko \
|
|
|
|
|| die "ehci_hcd: module load failed"
|
|
|
|
fi
|
|
|
|
if ! lsmod | grep -q xhci_pci; then
|
|
|
|
insmod /lib/modules/xhci-pci.ko \
|
|
|
|
|| die "ehci_pci: module load failed"
|
2017-04-05 23:20:53 +00:00
|
|
|
fi
|
|
|
|
if ! lsmod | grep -q usb_storage; then
|
|
|
|
insmod /lib/modules/usb-storage.ko \
|
|
|
|
|| die "usb_storage: module load failed"
|
2017-04-03 21:09:54 +00:00
|
|
|
sleep 5
|
|
|
|
fi
|
2017-04-02 03:02:00 +00:00
|
|
|
|
|
|
|
if [ ! -d /media ]; then
|
|
|
|
mkdir /media
|
|
|
|
fi
|
|
|
|
|
|
|
|
mount -o ro $1 /media
|