[ -z "$imgmd5" ] && exit 0
[ -s "$imgmd5" ] || exit 0
-echo MD5 file: $imgmd5
-
logfile=$(tempfile)
-echo Logfile: $logfile
-
# Get the name of the disk image by stripping off the tailing '.md5sum'
img=${imgmd5%.md5sum}
-echo Image: $img
-
touch $noburnfile
# A little paranoia. Make sure the disk image file is there.
# Now verify the disk by running md5sum on the entire contents of the disk
md5sum=$(tempfile)
-echo Md5sum: $md5sum
dd if=$dev bs=1M count=4440 2>$logfile | md5sum | awk '{print$1}' > $md5sum
# Check that the md5sums match