From: Carl N. Baldwin Date: Sat, 29 Oct 2005 19:59:28 +0000 (-0600) Subject: Use 'noburn' file to prohibit burning X-Git-Tag: release-0.4~42 X-Git-Url: http://git.pippins.net/embedvideo/.git/static/images/%7Blink_participation%7D?a=commitdiff_plain;h=03f192444fbb9c458170149cfd5c609c922bf65b;p=backups%2F.git Use 'noburn' file to prohibit burning --- diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index 8439a9b..27f7ad2 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -9,6 +9,9 @@ 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 @@ -41,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 diff --git a/scripts/config.sh b/scripts/config.sh index 26463ae..621b76f 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -11,6 +11,7 @@ imagedir="/backup/imgs" lastbackupfile="$imagedir/lastbackup" dev="/dev/hdc" sdev="ATA:1,0,0" +burnlockfile="$imagedir/noburn" backupdirs=" /etc