projects
/
backups
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added 2nd try to rsync when the 1st attempt fails to cache the burn image properly.
[backups/.git]
/
scripts
/
burn-imgs.sh
diff --git
a/scripts/burn-imgs.sh
b/scripts/burn-imgs.sh
index 6f0ed554c9c9855f06bbba0d8e15ddb70f39062f..a24df15591ce9656cc2321dddefd8d1cc2f71475 100755
(executable)
--- 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
# 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
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
fi
img=$cacheburnimgdir/$(basename "$img")
fi
@@
-44,7
+48,7
@@
$cronstopstart stop
renice -10 $$
# Burn the image to a disk.
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!"
if [ "0" != "$?" ]; then
echo >&2 "cdrecord failed!"