From: Alan Jack Pippin Date: Sun, 30 Apr 2006 13:57:34 +0000 (-0600) Subject: Added 2nd try to rsync when the 1st attempt fails to cache the burn image properly. X-Git-Tag: release-0.6~4 X-Git-Url: http://git.pippins.net/embedvideo/%7Bediturl%7D?a=commitdiff_plain;h=200a6dda1a8381f3c83753156d6248ba7ff8836b;p=backups%2F.git Added 2nd try to rsync when the 1st attempt fails to cache the burn image properly. --- diff --git a/scripts/burn-imgs.sh b/scripts/burn-imgs.sh index 6f0ed55..a24df15 100755 --- a/scripts/burn-imgs.sh +++ b/scripts/burn-imgs.sh @@ -27,10 +27,14 @@ touch $noburnfile # Now check to see if we need to cache the image to a local drive before burning the image if [[ $cacheburnimg == 1 && -d $cacheburnimgdir ]]; then - rsync -av --exclude '*.mnt' $img* $cacheburnimgdir > $logfile 2>&1 + rsync -av --exclude '*.mnt' $img* $cacheburnimgdir >> $logfile 2>&1 if [ $? != 0 ]; then - cat $logfile | mailx -s "backups: failed to cache $img to local dir $cacheburnimgdir !!!" $mailto - exit 1 + sleep 60 + rsync -av --exclude '*.mnt' $img* $cacheburnimgdir >> $logfile 2>&1 + if [ $? != 0 ]; then + cat $logfile | mailx -s "backups: failed to cache $img to local dir $cacheburnimgdir !!!" $mailto + exit 1 + fi fi img=$cacheburnimgdir/$(basename "$img") fi @@ -44,7 +48,7 @@ $cronstopstart stop renice -10 $$ # Burn the image to a disk. -cdrecord-wrapper.sh $cdrecordopts dev=$sdev $img > $logfile 2>&1 +cdrecord-wrapper.sh $cdrecordopts dev=$sdev $img >> $logfile 2>&1 if [ "0" != "$?" ]; then echo >&2 "cdrecord failed!"