projects
/
backups
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
871b039
)
Added 2nd try to rsync when the 1st attempt fails to cache the burn image properly.
author
Alan Jack Pippin
<ajp@pippin.(none)>
Sun, 30 Apr 2006 13:57:34 +0000
(07:57 -0600)
committer
Alan J. Pippin
<ajp@pippins.net>
Sun, 30 Apr 2006 13:57:34 +0000
(07:57 -0600)
scripts/burn-imgs.sh
patch
|
blob
|
history
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!"