36 |
|
exit 0 |
37 |
|
else |
38 |
|
echo " File is really broken. Remove it." |
39 |
< |
rm -f $dir/$file |
39 |
> |
remove --exe --catalog $dir/$file |
40 |
|
fi |
41 |
|
else |
42 |
|
echo "" |
66 |
|
echo " ERRO - File is broken again. Removing it." |
67 |
|
echo " $dir/$file" |
68 |
|
echo "" |
69 |
< |
rm -f $dir/$file |
69 |
> |
remove --exe --catalog $dir/$file |
70 |
|
fi |
71 |
|
else |
72 |
|
echo "" |
91 |
|
echo "" |
92 |
|
echo " GOOD - Recovery completed successfully from CERN." |
93 |
|
echo " $dir/$file" |
94 |
< |
# try to recover Tier-2 from CERN |
95 |
< |
echo " Start recovery on Tier-2." |
96 |
< |
downloadFile.sh $CERN_LOC/$cfg/$version/$dset/$file $MIT_LOC/$cfg/$version/$dset/$file \ |
97 |
< |
>& /dev/null |
98 |
< |
echo " -> Download (to Tier-2) status: $?" |
99 |
< |
test=`catalogFile.sh $MIT_LOC/$cfg/$version/$dset $file 2> /dev/null | grep XX-CATALOG-XX` |
100 |
< |
if [ "$test" != "" ] |
94 |
> |
# try to recover Tier-2 from CERN if that is required |
95 |
> |
if [ "$MIT_LOC/$cfg/$version/$dset/$file" != "$dir/$file" ] |
96 |
|
then |
97 |
< |
echo "" |
98 |
< |
echo " GOOD - Recovery on Tier-2 completed successfully from CERN." |
99 |
< |
echo " $MIT_LOC/$cfg/$version/$dset/$file" |
100 |
< |
echo "" |
101 |
< |
else |
102 |
< |
echo " ERRO - File on tier-2 is still broken. Stop process" |
103 |
< |
echo " $MIT_LOC/$cfg/$version/$dset/$file" |
104 |
< |
echo "" |
105 |
< |
fi |
97 |
> |
echo " Start recovery on Tier-2." |
98 |
> |
downloadFile.sh $CERN_LOC/$cfg/$version/$dset/$file $MIT_LOC/$cfg/$version/$dset/$file \ |
99 |
> |
>& /dev/null |
100 |
> |
echo " -> Download (to Tier-2) status: $?" |
101 |
> |
test=`catalogFile.sh $MIT_LOC/$cfg/$version/$dset $file 2> /dev/null | grep XX-CATALOG-XX` |
102 |
> |
if [ "$test" != "" ] |
103 |
> |
then |
104 |
> |
echo "" |
105 |
> |
echo " GOOD - Recovery on Tier-2 completed successfully from CERN." |
106 |
> |
echo " $MIT_LOC/$cfg/$version/$dset/$file" |
107 |
> |
echo "" |
108 |
> |
else |
109 |
> |
echo " ERRO - File on tier-2 is still broken. Stop process" |
110 |
> |
echo " $MIT_LOC/$cfg/$version/$dset/$file" |
111 |
> |
echo "" |
112 |
> |
fi |
113 |
> |
fi |
114 |
|
else |
115 |
|
echo " ERRO - File is broken again. Removing it." |
116 |
|
echo " $dir/$file" |