function mountcheck () { # Check to see whether it exists ;-) grep /media/usb"$MOUNTPOINT" /etc/mtab > /dev/null 2>&1 if [ $? -ne 0 ] ; then echo info-col echo "/media/usb"$MOUNTPOINT" is not mounted, according to mtab" echo "Did you type the right number?" echo sleep 5 f-usb fi } function f-usb () { clear fig-col bold figlet inx" "usb echo head-col echo "Access your mounted usb devices" echo echo info-col echo "When usb devices are plugged in, you should see some lines of output text at the foot of the screen." echo head-col echo "Refresh this page by hitting and the mount point in /media will appear in green" info-col echo echo "Device Mount Point" bold green echo grep /media/usb /etc/mtab | cut -f 2 -d" " echo echo info-col echo "Choose the device you want to access by usb number." echo "For example, \"0\" for /media/usb0 " echo echo head-col echo "e: Eject and unmount a device." echo "f: Flip colour" echo "m: INX main menu." echo "x: Give me a command prompt." echo f-ttynum read -s -n 1 MOUNTPOINT case "$MOUNTPOINT" in [0-7] ) mountcheck f-access ;; e) MOUNTPOINT= f-eject f-usb ;; f) export CALL=usb f-switch ;; m) f-menu ;; x) clear f-prompt ;; *) f-usb ;; esac }