- Timestamp:
- 05/11/12 18:16:10 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r664 r667 1180 1180 echo "IGCM_sys_Put_Out :" $@ 1181 1181 fi 1182 1183 typeset NB_ESSAI DELAI RET i 1184 1185 # number of tentative 1186 NB_ESSAI=10 1187 # time delay between tentative 1188 DELAI=10 1189 1182 1190 if [ $DRYRUN = 0 ]; then 1183 1191 if [ ! -f ${1} ] ; then … … 1189 1197 IGCM_sys_MkdirArchive $( dirname $2 ) 1190 1198 # 1191 typeset RET1192 1199 1193 1200 #===================================================== … … 1211 1218 fi 1212 1219 # 1220 1221 (( i = 0 )) 1222 while [ $i -lt $NB_ESSAI ] ; do 1213 1223 # USUAL WAY 1214 \cp $1 $2 > out_rsync 2>&1 1215 RET=$? 1224 \cp $1 $2 > out_rsync 2>&1 1225 RET=$? 1226 if [ ${RET} -gt 0 ]; then 1227 IGCM_debug_Print 2 "IGCM_sys_Put_Out : cp failed ${i}/${NB_ESSAI}" 1228 IGCM_debug_Print 2 "IGCM_sys_Put_Out : sleep ${DELAI} seconds and try again." 1229 sleep $DELAI 1230 else 1231 break 1232 fi 1233 (( i = i + 1 )) 1234 done 1216 1235 1217 1236 # #RSYNC WITH NETWORK SSH CALL … … 1297 1316 1298 1317 typeset DEST RET dm_liste ifile target file_work 1318 typeset NB_ESSAI DELAI status i 1299 1319 1300 1320 if ( $DEBUG_sys ) ; then 1301 1321 echo "IGCM_sys_Get :" $@ 1302 1322 fi 1323 1324 # number of tentative 1325 NB_ESSAI=10 1326 # time delay between tentative 1327 DELAI=10 1328 1303 1329 if [ $DRYRUN -le 2 ]; then 1304 1330 if [ X${1} = X'/l' ] ; then … … 1368 1394 for target in ${dm_liste[*]} ; do 1369 1395 local_file=$( basename ${target} ) 1370 \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 1371 (( RET = RET + $? )) 1396 (( i = 0 )) 1397 while [ $i -lt $NB_ESSAI ] ; do 1398 \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 1399 status=$? 1400 if [ ${status} -gt 0 ]; then 1401 IGCM_debug_Print 2 "IGCM_sys_Get : cp failed ${i}/${NB_ESSAI}" 1402 IGCM_debug_Print 2 "IGCM_sys_Get : sleep ${DELAI} seconds and try again." 1403 sleep $DELAI 1404 else 1405 break 1406 fi 1407 (( i = i + 1 )) 1408 done 1409 (( RET = RET + status )) 1372 1410 done 1373 1411 else
Note: See TracChangeset
for help on using the changeset viewer.