I usually use this script first, and then go with Pidsley's script to fill the mp3 reader.
Code: Select all
#!/bin/sh
#
# Script to properly mount USB Novell Netware 386.
#
# I only use one USB key at the time, so the script
# umounts everything in /media/usb* on purpose.
# It is possible to specify a different device.
if [ ! -z $1 ]; then
echo "you specified a device"
check=$(fdisk -l | grep Netware | grep $1 | awk '{print $1}')
if [ ! -z $check ]; then
device=$1
else
echo "no Novel Netware 386 on "$1
exit 1
fi
else
# default device
check=$(fdisk -l | grep Netware | grep sdb | awk '{print $1}')
if [ ! -z $check ]; then
device="/dev/sdb"
else
echo "no Novel Netware 386 on /dev/sdb"
exit 1
fi
fi
# log device
echo "found USB Novell Netware 386 on $device"
# create /media/usb if needed
if [ ! -d "/media/usb" ]; then
mkdir -p /media/usb
fi
# umount possible automounted devices
umount /media/usb* 2>/dev/null
# mount
mount $device /media/usb -o async,uid=1000,gid=1000,utf8,dmask=027,fmask=137
# log done
echo "$device mounted on /media/usb"