#!/bin/sh
-PATH=/bin:/usr/bin
+PATH=$(dirname $0):/bin:/usr/bin
-mailto=carl@ecbaldwin.net
-dev="/dev/hdc"
-sdev="ATA:1,0,0"
-imagedir="/backup/imgs"
+. config.sh
+
+# If the noburn file is there then don't burn.
+[ -f "$burnlockfile" ] && exit 0
# Discover disk images by looking for .img.md5sum files in $imagedir
imgmd5=$(ls $imagedir/*.img.md5sum | head -n 1)
# Record the date in the stat file to indicate that this burn was a success
date >> $img.stat
+touch $burnlockfile
+
{ # Send e-mail
echo "Image md5sum:"
cat $img.md5sum