3 mailto=carl@ecbaldwin.net
6 imagedir="/backup/imgs"
8 img=$(ls $imagedir | head -n 1)
11 if [ -n "$img" ]; then
12 if cdrecord-wrapper.sh -dao speed=8 dev=$sdev $isoimage; then
14 dd if=$dev bs=1M count=4440 | md5sum | awk '{print$1}' > $md5sum
15 if ! cmp $md5sum $isoimage.md5sum; then
16 echo "Failed" | mailx -s "DVD md5sum doesn't match image file!!!" $mailto
19 echo $md5sum >> $img.stat
22 echo "Failed" | mailx -s "DVD burning failed!!!" $mailto
26 if [ "$(wc -l $img.stat 2>/dev/null)" == "2" ]; then
27 echo "Burned the image twice. Removing it!"
28 rm -f $img{,.md5sum,.stat}