Index: trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh
===================================================================
--- trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 1169)
+++ trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh	(revision 1171)
@@ -82,5 +82,4 @@
 typeset -r RSYNC_opt="-va"
 # ie storage filesystem
-###typeset -r STOREHOST=gaya
 typeset -r STOREHOST=ergon
 typeset -r REMOTE_RSYNC=/u/rech/ces/rces452/RSYNC/bin/rsync
@@ -247,33 +246,10 @@
 function IGCM_sys_RshArchive {
   IGCM_debug_PushStack "IGCM_sys_RshArchive" $@
-  typeset ergonCount gayaCount
   DEBUG_sys=false IGCM_sys_IsFileArchived "$@"
-  if [ $? = 0 ] ; then
-    status=0
-    #special case for the find command. Only used together with RshArchive to find tared restart
-    if [ "X$( echo $@ | grep ^find | grep RESTART )" != "X" ] ; then
-      # Ergon first
-      rsh ${STOREHOST} exec /bin/ksh <<-EOF > ergonList.txt
-    ${@}
-EOF
-      (( status=status + $? ))
-      # Gaya turn
-      rsh gaya exec /bin/ksh <<-EOF > gayaList.txt
-    ${@}
-EOF
-      (( status=status + $? ))
-
-      # the more the better
-      ergonCount=$( cat ergonList.txt | wc -l )
-      gayaCount=$(  cat gayaList.txt  | wc -l )
-
-      [ ${ergonCount} -ge ${gayaCount} ] && cat ergonList.txt || cat gayaList.txt
-      rm -f ergonList.txt gayaList.txt
-    else
+  if [ $? = 0 ] ; then    
     rsh ${STOREHOST} exec /bin/ksh <<-EOF
     ${@}
 EOF
     status=$?
-    fi
   else
     /bin/ksh <<-EOF
@@ -552,5 +528,5 @@
   fi
   typeset IsArchivedFlag
-  IsArchivedFlag=$( ( [ "X$( echo $@ | grep \/u\/ )" != "X" ] || [ "X$( echo $@ | grep \/\arch\/home )" != "X" ] ) && echo 0 || echo 1 )
+  IsArchivedFlag=$( [ "X$( echo $@ | grep \/arch\/home )" != "X" ] && echo 0 || echo 1 )
   IGCM_debug_PopStack "IGCM_sys_IsFileArchived"
 
@@ -565,40 +541,10 @@
 function IGCM_sys_TestFileArchive {
   IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
-  typeset ExistFlag TempCommandFile
-  TempCommandFile="[ -f $1 ] && echo 0 || echo 1"
-  #Command depends on targeted file system
-  #We want it quiet
-  DEBUG_sys=false IGCM_sys_IsFileArchived $1
-  if [ $? = 0 ] ; then
-    ExistFlag=$( IGCM_sys_RshArchive ${TempCommandFile} )
-  else
-    ExistFlag=$( ${TempCommandFile} )
-  fi
+  typeset ExistFlag  
+  ExistFlag=$( IGCM_sys_RshArchive "[ -f $1 ] && echo 0 || echo 1" )
   IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
 
   return ${ExistFlag}
 }
-
-#D-#==================================================
-#D-function IGCM_sys_TestFileArchive
-#D-* Purpose: Test file that must NOT EXISTS on Archive
-#D-* Examples:
-#D-
-#function IGCM_sys_TestFileArchive {
-#  IGCM_debug_PushStack "IGCM_sys_TestFileArchive" $@
-#  typeset ExistFlag finalPosition
-#
-#  DEBUG_sys=false IGCM_sys_IsFileArchived $1
-#  if [ $? = 0 ] ; then
-#    finalPosition=$( mfls $1 2>/dev/null | wc -l )
-#    [ ${finalPosition} -eq 4 ] && ExistFlag=1 || ExistFlag=0
-#  else
-#    ExistFlag=$( [ -f $1 ] && echo 0 || echo 1 )
-#  fi
-#
-#  IGCM_debug_PopStack "IGCM_sys_TestFileArchive"
-#
-#  return ${ExistFlag}
-#}
 
 #D-#==================================================
@@ -637,42 +583,4 @@
   IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
 }
-
-#D-#==================================================
-#D-function IGCM_sys_CountFileArchive
-#D-* Purpose: Count files on Archive filesystem
-#D-* Examples:
-#D-
-#function IGCM_sys_CountFileArchive {
-#  IGCM_debug_PushStack "IGCM_sys_CountFileArchive" $@
-#  typeset status gayaPosition ergonPosition finalPosition gayaCount ergonCount
-#  #Command depends on targeted file system
-#  DEBUG_sys=false IGCM_sys_IsFileArchived $1
-#  if [ $? = 0 ] ; then
-#    status=0
-#    gayaPosition=$(  mfls ${@} 2>/dev/null | grep -n "++ Gaya"  | awk -F\: {'print $1'} )
-#    (( status=status + $? ))
-#    ergonPosition=$( mfls ${@} 2>/dev/null | grep -n "++ Ergon" | awk -F\: {'print $1'} )
-#    (( status=status + $? ))
-#    finalPosition=$( mfls ${@} 2>/dev/null | wc -l )
-#    (( status=status + $? ))
-
-#    (( gayaCount  = ergonPosition - gayaPosition - 2 ))
-#    (( ergonCount = finalPosition - ergonPosition ))
-
-#    # return number of files found. greater the better
-#    [ ${ergonCount} -ge ${gayaCount} ] && echo ${ergonCount} || echo ${gayaCount}
-
-#    # "Ergon only" case
-#    #IGCM_sys_RshArchive "ls ${@} 2>/dev/null | wc -l"
-#    #status=$?
-#  else
-#    ls ${@} 2>/dev/null | wc -l
-#    status=$?
-#  fi
-#  if [ ${status} -gt 0 ] ; then
-#    echo "IGCM_sys_CountFileArchive : erreur."
-#  fi
-#  IGCM_debug_PopStack "IGCM_sys_CountFileArchive"
-#}
 
 #D-#==================================================
