From 4affe710e9e3a4ea439ead2ad604a3450451200b Mon Sep 17 00:00:00 2001
From: Alan Jack Pippin <ajp@pippin.(none)>
Date: Sat, 31 Dec 2005 08:33:09 -0700
Subject: [PATCH] Changed grep -v against $logfile to throw out lines with
 control characters.

---
 scripts/burn-imgs.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh
index da5b11b..f4b8649 100755
--- a/scripts/burn-imgs.sh
+++ b/scripts/burn-imgs.sh
@@ -39,7 +39,7 @@ cdrecord-wrapper.sh $cdrecordopts dev=$sdev $img > $logfile 2>&1
 if [ "0" != "$?" ]; then
   echo >&2 "cdrecord failed!"
   $cronstopstart start
-  cat $logfile | grep -v "MB written" | grep -v "to quit" | mailx -s "backups: failed to burn $img!!!" $mailto
+  cat $logfile | grep -v -e '[
]' | mailx -s "backups: failed to burn $img!!!" $mailto
   exit 1
 fi
 
@@ -59,7 +59,7 @@ 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
-  cat $logfile | grep -v "MB written" | grep -v "to quit" | mailx -s "DVD md5sum doesn't match image file!!!" $mailto
+  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 "MB written" | grep -v "to quit" | 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
-- 
2.34.1