3 # This script is called from VDR to mount/unmount/eject
4 # the sources for MP3 play.
6 # argument 1: wanted action, one of mount,unmount,eject,status
7 # argument 2: mountpoint to act on
9 # mount,unmount,eject must return 0 if succeeded, 1 if failed
10 # status must return 0 if device is mounted, 1 if not
18 eject -t "$path" || exit 1 # close the tray
19 mount "$path" || exit 1 # mount it
22 umount "$path" || exit 1 # unmount it
25 eject "$path" || exit 1 # eject disk
28 cat /proc/mounts | grep -q "$path" # check if mounted
29 if [ $? -ne 0 ]; then # not mounted ...