From: Alan Jack Pippin Date: Mon, 2 Jan 2006 14:41:48 +0000 (-0700) Subject: Adjusted logfile redirection for a failed md5sum and for a successful burn. X-Git-Tag: release-0.5~3 X-Git-Url: http://git.pippins.net/embedvideo/.git/%22%22.%24thumbnail.%22/%7Bview%7D?a=commitdiff_plain;h=847e9a230de55f7dd4d9cd0d9a2845a6377b26c5;p=backups%2F.git Adjusted logfile redirection for a failed md5sum and for a successful burn. --- diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index f4b8649..115d58c 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -58,7 +58,7 @@ dd if=$dev bs=1M count=$imagesizemb 2>>$logfile | md5sum | awk '{print$1}' > $md if ! cmp $md5sum $img.md5sum; then echo "md5sum check FAILED" >> $logfile echo "dd if=$dev bs=1M count=$imagesizemb 2>>$logfile | md5sum | awk '{print\$1}' > $md5sum" >> $logfile - e2label $dev >> $logfile + e2label $dev >> $logfile 2>&1 cat $logfile | grep -v -e '[ ]' | mailx -s "DVD md5sum doesn't match image file!!!" $mailto exit 1 fi @@ -76,7 +76,7 @@ date >> $img.stat cat $img.stat echo cat $logfile -} | grep -v -e '[ ]' | mailx -s "DVD burned. File as $(basename ${img%.*})" $mailto > $logfile 2>&1 +} | grep -v -e '[ ]' | mailx -s "DVD burned. File as $(basename ${img%.*})" $mailto >> $logfile 2>&1 # Two lines in the stat file indicate two successful burns. Clean-up the image. if [ "$(wc -l $img.stat 2>/dev/null | awk '{print$1}')" == "$makeXcopies" ]; then