I wrote a bash script to copy files from the hard-drive to a dvd and then verify the burning by comparing all burned files with the original.
My problem is that I am having trouble remounting the dvd when the burn is complete. The code as I have it works 90% of the time but sometimes the mount call fails because the device is "already mounted or device is busy" or some thing like that.
Automounting is turned off for optical media and I would prefer to keep it that way, so an excerpt from my script looks like this (starting after burning is complete):
# open and close the drive
# another script verifies...
verifymedia /mnt/dvd $1
My question is, does anyone know of a better way to ensure the drive is mounted before proceeding? Mine is not only ugly but it doesn't always work.
Thanks in advance for any suggestions.