# We get $MOUNTPOINT from f-usb

function f-access ()
{
clear
head-col
echo "Type the number for the access method you want."
info-col
echo
echo "1: Midnight Commander (mc)"
echo "2: Vi File Manager    (vifm)"
echo "3: Linm File Manager  (linm)"
echo "4: Just give me a shell prompt at the mountpoint"
echo
echo "5: Open the mountpoint in the music player (mocp)"
echo
echo "e: Unmount and eject my device safely"
echo
head-col
echo "Any other key returns to the usb menu."

# Print tty number right edge of terminal
f-ttynum

read -s -n 1 ACCESS

case "$ACCESS" in

	1)
	cd "/media/usb"$MOUNTPOINT"" && f-sup && mc && cd 
	;;
	2)
	cd "/media/usb"$MOUNTPOINT"" && f-sup && vifm && cd 
	;;
	3)
	cd "/media/usb"$MOUNTPOINT"" && f-sup && linm && cd 
	;;
	4)
	clear
	info-col
	echo
	echo "OK - this is a subshell. Type exit when you are finished"
	echo "and you will be back in "$HOME". You can then unmount your"
	echo "device. Don't forget that you are using this subshell," 
	echo "or the device may show \"busy!\" and refuse to unmount."
	echo
	cd "/media/usb"$MOUNTPOINT"" && white && unbold && /bin/bash && cd 
	;;
	5)
	f-sup ; mocp "/media/usb"$MOUNTPOINT"" && cd
	;;
	e)
	f-eject
	;;
	*)
	f-usb
	;;

esac

f-access

}


