Changeset 715
- Timestamp:
- 10/12/12 10:39:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r714 r715 827 827 fi 828 828 829 typeset RETDEST829 typeset status DEST 830 830 831 831 mkdir -p ${HOME}/MIRROR/${PATHlibIGCM} … … 833 833 echo ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} > out_rsync 2>&1 834 834 ${RSYNC} ${RSYNC_opt} ${libIGCM} ${HOME}/MIRROR/${PATHlibIGCM} >> out_rsync 2>&1 835 RET=$?836 837 if [ ${ RET} -gt 0 ] ; then835 status=$? 836 837 if [ ${status} -gt 0 ] ; then 838 838 echo "IGCM_sys_Mirror_libIGCM Warning : no libIGCM on cesium." 839 839 cat out_rsync … … 853 853 fi 854 854 855 typeset RET855 typeset status 856 856 857 857 echo cp $@ > out_rsync 2>&1 858 858 \cp $@ >> out_rsync 2>&1 859 RET=$?860 861 if [ ${ RET} -gt 0 ] ; then862 echo "IGCM_sys_Cp : error code ${ RET}"859 status=$? 860 861 if [ ${status} -gt 0 ] ; then 862 echo "IGCM_sys_Cp : error code ${status}" 863 863 cat out_rsync 864 864 IGCM_debug_Exit "IGCM_sys_Cp" … … 880 880 fi 881 881 882 typeset RET882 typeset status 883 883 884 884 echo rm $@ > out_rsync 2>&1 885 885 \rm $@ >> out_rsync 2>&1 886 RET=$?887 888 if [ ${ RET} -gt 0 ] ; then889 echo "IGCM_sys_Rm : error code ${ RET}"886 status=$? 887 888 if [ ${status} -gt 0 ] ; then 889 echo "IGCM_sys_Rm : error code ${status}" 890 890 cat out_rsync 891 891 IGCM_debug_Exit "IGCM_sys_Rm" … … 908 908 fi 909 909 910 typeset RET910 typeset status 911 911 912 912 echo rm $@ > out_rsync 2>&1 913 913 \rm $@ >> out_rsync 2>&1 914 RET=$?915 916 if [ ${ RET} -gt 0 ] ; then917 echo "IGCM_sys_RmRunDir : error code ${ RET}"914 status=$? 915 916 if [ ${status} -gt 0 ] ; then 917 echo "IGCM_sys_RmRunDir : error code ${status}" 918 918 cat out_rsync 919 919 IGCM_debug_Exit "IGCM_sys_RmRunDir" … … 937 937 if [ $DRYRUN = 0 ]; then 938 938 939 typeset RET939 typeset status 940 940 941 941 echo mv $@ > out_rsync 2>&1 942 942 \mv $@ >> out_rsync 2>&1 943 RET=$?944 945 if [ ${ RET} -gt 0 ] ; then946 echo "IGCM_sys_Mv : error code ${ RET}"943 status=$? 944 945 if [ ${status} -gt 0 ] ; then 946 echo "IGCM_sys_Mv : error code ${status}" 947 947 cat out_rsync 948 948 IGCM_debug_Exit "IGCM_sys_Mv" … … 974 974 fi 975 975 976 typeset RET976 typeset status 977 977 978 978 # Only if we use rsync … … 981 981 #USUAL WAY 982 982 \cp -r $1 $2 > out_rsync 2>&1 983 RET=$?984 985 if [ ${ RET} -gt 0 ] ; then986 echo "IGCM_sys_Put_Dir : error code ${ RET}"983 status=$? 984 985 if [ ${status} -gt 0 ] ; then 986 echo "IGCM_sys_Put_Dir : error code ${status}" 987 987 cat out_rsync 988 988 IGCM_debug_Exit "IGCM_sys_Put_Dir" … … 1126 1126 fi 1127 1127 1128 typeset RET1128 typeset status 1129 1129 # 1130 1130 if [ X${JobType} = XRUN ] ; then … … 1135 1135 # USUAL WAY 1136 1136 \cp $1 $2 > out_rsync 2>&1 1137 RET=$?1137 status=$? 1138 1138 1139 1139 # #RSYNC WITH NETWORK SSH CALL … … 1145 1145 # ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1 1146 1146 1147 # RET=$?1148 # IGCM_sys_Rsync_out $ RET1147 # status=$? 1148 # IGCM_sys_Rsync_out $status 1149 1149 1150 1150 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 1151 # (( RET=RET+$? ))1152 1153 if [ ${ RET} -gt 0 ] ; then1154 echo "IGCM_sys_Put_Rest : cp failed error code ${ RET}"1151 # (( status=status+$? )) 1152 1153 if [ ${status} -gt 0 ] ; then 1154 echo "IGCM_sys_Put_Rest : cp failed error code ${status}" 1155 1155 cat out_rsync 1156 1156 IGCM_debug_Exit "IGCM_sys_Put_Rest" … … 1181 1181 fi 1182 1182 1183 typeset RET1183 typeset status 1184 1184 # 1185 1185 if [ X${JobType} = XRUN ] ; then … … 1190 1190 # USUAL WAY 1191 1191 \cp $1 $2 > out_rsync 2>&1 1192 RET=$?1193 1194 if [ ${ RET} -gt 0 ] ; then1195 echo "IGCM_sys_PutBuffer_Rest : error code ${ RET}"1192 status=$? 1193 1194 if [ ${status} -gt 0 ] ; then 1195 echo "IGCM_sys_PutBuffer_Rest : error code ${status}" 1196 1196 cat out_rsync 1197 1197 IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" … … 1448 1448 1449 1449 ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1 1450 RET=$?1451 if [ ${ RET} -gt 0 ] ; then1452 echo "WARNING IGCM_sys_Get : error code ${ RET}"1450 status=$? 1451 if [ ${status} -gt 0 ] ; then 1452 echo "WARNING IGCM_sys_Get : error code ${status}" 1453 1453 cat out_rsync 1454 1454 echo "WARNING IGCM_sys_Get : will stop later if the cp fails." 1455 1455 fi 1456 1456 1457 #if [ ${ RET} -gt 0 ] ; then1457 #if [ ${status} -gt 0 ] ; then 1458 1458 # if [ ! "X$( grep "Lost dmusrcmd connection" out_rsync )" = "X" ] ; then 1459 1459 # cat out_rsync … … 1463 1463 ## dmget ${dm_liste[*]} > out_rsync 2>&1 1464 1464 # ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1 1465 # RET=$?1466 # if [ ${ RET} -gt 0 ] ; then1465 # status=$? 1466 # if [ ${status} -gt 0 ] ; then 1467 1467 # echo "ERROR IGCM_sys_Get : again demigration error :" 1468 1468 # cat out_rsync … … 1484 1484 # test if the target file is present before the loop 1485 1485 IGCM_sys_TestFileArchive ${target} 1486 RET=$?1487 if [ ${ RET} -gt 0 ] ; then1486 status=$? 1487 if [ ${status} -gt 0 ] ; then 1488 1488 echo "IGCM_sys_Get, ERROR : regular file ${target} DOES NOT EXIST ." 1489 1489 IGCM_debug_Exit "IGCM_sys_Get" … … 1506 1506 else 1507 1507 \cp ${dm_liste} ${DEST} >> out_rsync 2>&1 1508 RET=$?1508 status=$? 1509 1509 fi 1510 1510 … … 1517 1517 # ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1 1518 1518 1519 # RET=$?1520 # IGCM_sys_Rsync_out $ RET1519 # status=$? 1520 # IGCM_sys_Rsync_out $status 1521 1521 1522 1522 # ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync … … 1524 1524 1525 1525 if [ ${RET} -gt 0 ] ; then 1526 echo "IGCM_sys_Get : error code ${RET}"1526 echo "IGCM_sys_Get : error" 1527 1527 cat out_rsync 1528 \rm out_rsync 1528 1529 IGCM_debug_Exit "IGCM_sys_Get" 1529 1530 else … … 1544 1545 IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@ 1545 1546 1546 typeset DEST RET buf_liste ifile target file_work1547 typeset DEST RET status buf_liste ifile target file_work 1547 1548 1548 1549 if ( $DEBUG_sys ) ; then … … 1568 1569 else 1569 1570 \cp ${buf_liste} ${DEST} >> out_rsync 2>&1 1570 RET=$?1571 status=$? 1571 1572 fi 1572 1573 1573 1574 if [ ${RET} -gt 0 ] ; then 1574 echo "IGCM_sys_GetBuffer : error code ${RET}"1575 echo "IGCM_sys_GetBuffer : error" 1575 1576 cat out_rsync 1577 \rm out_rsync 1576 1578 IGCM_debug_Exit "IGCM_sys_GetBuffer" 1577 1579 else … … 1628 1630 echo "IGCM_sys_Dods_Rm :" $@ 1629 1631 fi 1630 typeset RET 1631 RET=0 1632 typeset status 1632 1633 if [ $DRYRUN = 0 ]; then 1633 1634 … … 1639 1640 1640 1641 /ccc/cont003/home/dsm/p86ipsl/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 1641 RET=$?1642 1643 # if [ ${ RET} -gt 0 ] ; then1642 status=$? 1643 1644 # if [ ${status} -gt 0 ] ; then 1644 1645 # echo "IGCM_sys_Dods_Rm : error." 1645 1646 # cat out_dods_rm … … 1652 1653 ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack 1653 1654 fi 1654 return $ RET1655 return $status 1655 1656 } 1656 1657 … … 1664 1665 echo "IGCM_sys_Dods_Cp :" $@ 1665 1666 fi 1666 typeset RET 1667 RET=0 1667 typeset status 1668 1668 if [ $DRYRUN = 0 ]; then 1669 1669 … … 1675 1675 1676 1676 /ccc/cont003/home/dsm/p86ipsl/bin/dods_cp ${1} public/${LOGIN}/${R_DODS} # > out_dods_cp 2>&1 1677 RET=$?1678 1679 # if [ ${ RET} -gt 0 ] ; then1677 status=$? 1678 1679 # if [ ${status} -gt 0 ] ; then 1680 1680 # echo "IGCM_sys_Dods_Cp : error." 1681 1681 # cat out_dods_cp … … 1688 1688 ( ${DEBUG_debug} ) && echo "DRYRUN mode = " $DRYRUN >> stack 1689 1689 fi 1690 return $ RET1690 return $status 1691 1691 } 1692 1692 … … 1702 1702 fi 1703 1703 #set -vx 1704 typeset RET1704 typeset status 1705 1705 if [ $DRYRUN = 0 ]; then 1706 1706 if ( [ ! -d ${R_SAVE}/${1} ] && [ ! -d ${R_FIGR}/${1} ] ) ; then … … 1728 1728 IGCM_sys_Dods_Rm ${1} 1729 1729 IGCM_sys_Dods_Cp ${1} 1730 RET=01731 1732 if [ ${ RET} -gt 0 ] ; then1730 status=0 1731 1732 if [ ${status} -gt 0 ] ; then 1733 1733 echo "IGCM_sys_Put_Dods : error." 1734 1734 IGCM_debug_Exit "IGCM_sys_Put_Dods"
Note: See TracChangeset
for help on using the changeset viewer.