X-Git-Url: http://git.pippins.net/embedvideo/.git/static/%7Bg-%3Eurl%20arg1=?a=blobdiff_plain;f=scripts%2Fburn-imgs.sh;h=27f7ad201b06b7d0e9b689c43fd905886d22ca13;hb=03f192444fbb9c458170149cfd5c609c922bf65b;hp=a6a5ba9db6ad6fce932bcaa47e0cd3982aa8b750;hpb=f7eab4ae4b364489a6b985c5a1605846a23f4cf1;p=backups%2F.git diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index a6a5ba9..27f7ad2 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -1,17 +1,17 @@ #!/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 # Discover disk images by looking for .img.md5sum files in $imagedir imgmd5=$(ls $imagedir/*.img.md5sum | head -n 1) logfile=$(tempfile) +# If the noburn file is there then don't burn. +[ -f "$burnlockfile" ] && exit 0 + # If we didn't find an non-empty file then exit gracefully [ -z "$imgmd5" ] && exit 0 [ -s "$imgmd5" ] || exit 0 @@ -44,6 +44,8 @@ fi # 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