heads/initrd/bin/mount-usb

22 lines
308 B
Plaintext
Raw Normal View History

#!/bin/sh
# Mount a USB device
. /etc/functions
enable_usb
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
if [ ! -d /media ]; then
mkdir /media
fi
if [ -z "$1" ]; then
mount -o ro /media
else
mount -o ro $1 /media
fi