Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 69)
+++ palm/trunk/SCRIPTS/subjob	(revision 82)
@@ -1,4 +1,4 @@
 #!/bin/ksh
-# subjob - Plot-Shellskript         Version:  @(#)SUBJOB 1.0    13/02/07
+# subjob - Plot-Shellskript         Version:  @(#)SUBJOB 1.0
 # $Id: subjob 54 2007-03-08 00:00:02Z raasch $
 
@@ -81,9 +81,9 @@
      # 13/02/07 - Siggi - hpmuk releated code removed
      # 01/03/07 - Siggi - adjustments for RIAM machines gate and NEC-SX8 (n-sx)
+     # 12/04/07 - Siggi - option -f (filetransfer protocol) removed, scp only
 
 
     # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
  delete_dayfile=false 
- filetransfer_protocol=scp
  locat=normal
  no_default_queue=none
@@ -180,5 +180,5 @@
 
     # PROZEDUROPTIONEN EINLESEN
- while  getopts  :c:dDf:h:m:n:N:O:q:t:T:u:vX:  option
+ while  getopts  :c:dDh:m:n:N:O:q:t:T:u:vX:  option
  do
    case  $option  in
@@ -186,5 +186,4 @@
        (d)   delete_dayfile=true;;
        (D)   no_submit=true;;
-       (f)   filetransfer_protocol=$OPTARG;;
        (h)   remote_host=$OPTARG;;
        (m)   memory=$OPTARG;;
@@ -218,5 +217,4 @@
     printf "\n        -d    no job-protocol will be created     ---"
     printf "\n        -D    only the job-file will be created   ---"
-    printf "\n        -f    filetransfer protocol               scp"
     printf "\n        -h    execution host, available hosts:    $remote_host"
     printf "\n              ibm, ibmb, ibmh, ibms, ibmy, lcmuk,"
@@ -897,42 +895,33 @@
     then
        [[ $verify = true ]]  &&  printf "\n >>> transfering job to \"$remote_host\"..."
-       if [[ $filetransfer_protocol = scp ]]
-       then
-          if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
-          then
-             job_catalog_save=$job_catalog
-             job_catalog=job_queue
-          elif [[ $remote_host = nech ]]
-          then
-             job_catalog_save=$job_catalog
-             job_catalog=/hpf/b/${remote_user}/job_queue
-          fi
-          if [[ $local_host = decalpha ]]
-          then
-                # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE
-                # PASSWORT AB
-             /bin/scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
-          elif [[ $remote_host = nech ]]
-          then
-                # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
-                # TRANSFERIERT WERDEN
-             scp  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
-          else
-             scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
-          fi
-          if [[ $? = 1 ]]
-          then
-             locat=scp; exit
-          fi
-          if [[ $remote_host = ibms ]]
-          then
-             job_catalog=$job_catalog_save
-          fi
+       if [[ $remote_host = ibms  ||  $remote_host = ibmy ]]    # ssh on ibms cannot handle "~/"
+       then
+          job_catalog_save=$job_catalog
+          job_catalog=job_queue
+       elif [[ $remote_host = nech ]]
+       then
+          job_catalog_save=$job_catalog
+          job_catalog=/hpf/b/${remote_user}/job_queue
+       fi
+       if [[ $local_host = decalpha ]]
+       then
+             # VERWENDUNG VON SCP AUF DECALPHA FRAGT FEHLERHAFTERWEISE
+             # PASSWORT AB
+          /bin/scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
+       elif [[ $remote_host = nech ]]
+       then
+             # DATEIEN KOENNEN NUR UEBER DEN ARCHIVE-SERVER DES DKRZ
+             # TRANSFERIERT WERDEN
+          scp  $job_to_send  ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost
        else
-          ftpcopy -s -o  $remote_addres  $job_to_send  "$job_catalog"  $job_on_remhost
-          if [[ $? = 1 ]]
-          then
-             locat=ftpcopy; exit
-          fi
+          scp  $job_to_send  ${remote_user}@${remote_addres}:${job_catalog}/$job_on_remhost
+       fi
+       if [[ $? = 1 ]]
+       then
+          locat=scp; exit
+       fi
+       if [[ $remote_host = ibms ]]
+       then
+          job_catalog=$job_catalog_save
        fi
        [[ $verify = true ]]  &&  printf "\n >>> finished\n"
@@ -948,71 +937,30 @@
     then
        [[ $verify = true ]]  &&  printf "\n >>> submitting job using \"qsub\"...\n"
-       if [[ $filetransfer_protocol = scp ]]
-       then
-          if [[ $remote_host != lctit ]]
-          then
-             ssh  $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
-          else
-                # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS
-                # MIT SSH, DESHALB AUFRUF PER PIPE
-                # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR
-             print  "cd $job_catalog; chmod u+x $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
-             echo "first try" > send_protocol
-             while [[ $(cat send_protocol | grep -c "Forwarding to N1GE") = 0 ]]
-             do
-                if [[ $(cat send_protocol | grep -c "first try") = 1 ]]
-                then
-                   printf "\n trying to submit job to TIT cluster..."
-                else
-                   printf "\n +++ failed ... trying to submit again ..."
-                fi
-                print  "cd $job_catalog; $submcom $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  >  send_protocol  2>&1 
-                cat send_protocol
-             done
-             sleep 10
-             print  "cd $job_catalog;  rm $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
-             echo "$submcom  $job_on_remhost"
-             rm  send_protocol
-          fi
+       if [[ $remote_host != lctit ]]
+       then
+          ssh  $remote_addres  -l $remote_user  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
        else
-          if [[ $remote_host = ibms ]]
-          then
-             password=`cat ~/.netrc | grep $remote_addres | awk '{print $6}'`
-             echo "echo \"$remote_user\" "       >  telnet_script
-             echo "sleep 5"                      >> telnet_script
-             echo "echo \"$password\" "          >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "echo \"\" "                   >> telnet_script
-             echo "sleep 2"                      >> telnet_script
-             echo "echo \"cd $job_catalog; $submcom $job_on_remhost; rm -rf $job_on_remhost\" " >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "echo \"exit\" "               >> telnet_script
-
-             chmod  u+x  telnet_script
-             telnet_script  |  telnet $remote_addres  2>&1  |  grep "llsubmit:"
-             rm  telnet_script
-          elif [[ $remote_host = t3es ]]
-          then
-             password=`cat ~/.netrc | grep $remote_addres | awk '{print $6}'`
-             echo "printf \"$remote_user\\\n\" " >  telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "printf \"$password\\\n\" "    >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "printf \"\\\n\" "             >> telnet_script
-             echo "sleep 5"                      >> telnet_script
-             echo "printf \"\\\n\" "             >> telnet_script
-             echo "sleep 5"                      >> telnet_script
-             echo "printf \"cd $job_catalog; $submcom $job_on_remhost; rm -f $job_on_remhost\\\n\" " >> telnet_script
-             echo "sleep 10"                     >> telnet_script
-             echo "printf \"exit\\\n\" "         >> telnet_script
-
-             chmod  u+x  telnet_script
-             cat telnet_script
-             telnet_script | telnet $remote_addres  |  grep $remote_user
-             rm  telnet_script
-          else
-             remcom.x  $remote_addres  "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"
-          fi
-       fi
+             # TIT ERLAUBT NUR DIE AUSFÜHRUNG GANZ BESTIMMTER KOMMANDOS
+             # MIT SSH, DESHALB AUFRUF PER PIPE
+             # UEBERGANGSWEISE CHECK, OB N1GE ENVIRONMENT WIRKLICH VERFUEGBAR
+          print  "cd $job_catalog; chmod u+x $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
+          echo "first try" > send_protocol
+          while [[ $(cat send_protocol | grep -c "Forwarding to N1GE") = 0 ]]
+          do
+             if [[ $(cat send_protocol | grep -c "first try") = 1 ]]
+             then
+                printf "\n trying to submit job to TIT cluster..."
+             else
+                printf "\n +++ failed ... trying to submit again ..."
+             fi
+             print  "cd $job_catalog; $submcom $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  >  send_protocol  2>&1 
+             cat send_protocol
+          done
+          sleep 10
+          print  "cd $job_catalog;  rm $job_on_remhost"  |  ssh  $remote_addres  -l $remote_user  > /dev/null  2>&1 
+          echo "$submcom  $job_on_remhost"
+          rm  send_protocol
+       fi
+
        [[ $verify = true ]]  &&  printf " >>> o.k.\n"
     else
