Changeset 1944
- Timestamp:
- Jun 15, 2016 6:29:00 AM (8 years ago)
- Location:
- palm/trunk/SCRIPTS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mbuild
r1842 r1944 22 22 # Current revisions: 23 23 # ------------------ 24 # 24 # adjustments for using HLRN ssh-keys 25 25 # 26 26 # Former revisions: … … 682 682 683 683 684 # DETERMINE SSH-KEY TO BE USED 685 ssh_key="" 686 line="" 687 grep "$remote_host_string" $config_file | grep "%ssh_key " > $tmp_mbuild 688 while read line1 689 do 690 691 if [[ $(echo $line1 | cut -d" " -s -f3-) = "$remote_host_string" ]] 692 then 693 line="$line1" 694 fi 695 696 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 697 then 698 ssh_key="-i $HOME/.ssh/`echo $line | cut -d" " -s -f2`" 699 fi 700 701 done < $tmp_mbuild 702 703 704 684 705 # IN CASE OF PARALLEL EXECUTION (COMPILER FOR PARALLEL EXECUTION), 685 706 # A SERIAL COMPILERNAME MUST BE DETERMINED ALSO … … 1112 1133 if [[ $remote_host != lctit ]] 1113 1134 then 1114 ssh $ {remote_username}@${remote_address} "[[ ! -d ${remote_md} ]] && (echo \" *** ${remote_md} will be created\"; mkdir -p ${remote_md})"1135 ssh $ssh_key ${remote_username}@${remote_address} "[[ ! -d ${remote_md} ]] && (echo \" *** ${remote_md} will be created\"; mkdir -p ${remote_md})" 1115 1136 else 1116 1137 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS … … 1118 1139 fi 1119 1140 1120 scp $ {local_source_path}/${mainprog}_sources.tar ${remote_username}@${remote_address}:${remote_md}/${mainprog}_sources.tar1141 scp $ssh_key ${local_source_path}/${mainprog}_sources.tar ${remote_username}@${remote_address}:${remote_md}/${mainprog}_sources.tar 1121 1142 1122 1143 … … 1126 1147 if [[ $remote_host != lctit ]] 1127 1148 then 1128 ssh $ {remote_username}@${remote_address} "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]] && tar -xf ${mainprog}_current_version.tar"1149 ssh $ssh_key ${remote_username}@${remote_address} "cd ${remote_md}; [[ -f ${mainprog}_current_version.tar ]] && tar -xf ${mainprog}_current_version.tar" 1129 1150 else 1130 1151 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS … … 1137 1158 if [[ $remote_host != lctit ]] 1138 1159 then 1139 ssh $ {remote_username}@${remote_address} "cd ${remote_md}; tar -xf ${mainprog}_sources.tar"1160 ssh $ssh_key ${remote_username}@${remote_address} "cd ${remote_md}; tar -xf ${mainprog}_sources.tar" 1140 1161 else 1141 1162 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS … … 1198 1219 else 1199 1220 1200 echo "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh $ {remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll1221 echo "$init_cmds $module_calls cd ${remote_md}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh $ssh_key ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll 1201 1222 1202 1223 fi … … 1231 1252 if [[ $remote_host != lctit ]] 1232 1253 then 1233 ssh $ {remote_username}@${remote_address} "cd ${remote_md}; chmod u+w *; tar -cf ${mainprog}_current_version.tar ${mainprog} *.f90 *.o *.mod"1254 ssh $ssh_key ${remote_username}@${remote_address} "cd ${remote_md}; chmod u+w *; tar -cf ${mainprog}_current_version.tar ${mainprog} *.f90 *.o *.mod" 1234 1255 else 1235 1256 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS … … 1251 1272 if [[ $remote_host != lctit ]] 1252 1273 then 1253 ssh $ {remote_username}@${remote_address} "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)"1274 ssh $ssh_key ${remote_username}@${remote_address} "[[ ! -d ${remote_ud} ]] && (echo \" *** ${remote_ud} will be created\"; mkdir -p ${remote_ud}); [[ ! -d ${remote_ud}/../SCRIPTS ]] && (echo \" *** ${remote_ud}/../SCRIPTS will be created\"; mkdir -p ${remote_ud}/../SCRIPTS)" 1254 1275 else 1255 1276 # USING PIPE, BECAUSE TIT ALLOWS SSH TO EXECUTE ONLY SOME SELECTED COMMANDS … … 1258 1279 1259 1280 # COPY SHELL-SCRIPTS 1260 scp batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob ${remote_username}@${remote_address}:${remote_ud}/../SCRIPTS > /dev/null1281 scp $ssh_key batch_scp mbuild mrun process_dvr_output .dvrserver.config subjob ${remote_username}@${remote_address}:${remote_ud}/../SCRIPTS > /dev/null 1261 1282 1262 1283 cd - > /dev/null … … 1265 1286 1266 1287 # COPY UTILITY-ROUTINES 1267 scp Makefile *.f90 ${remote_username}@${remote_address}:${remote_ud} > /dev/null1288 scp $ssh_key Makefile *.f90 ${remote_username}@${remote_address}:${remote_ud} > /dev/null 1268 1289 1269 1290 … … 1322 1343 else 1323 1344 1324 echo "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh $ {remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll1345 echo "$init_cmds $module_calls cd ${remote_ud}; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh $ssh_key ${remote_username}@${remote_address} 2>&1 | tee ${remote_host}_last_make_protokoll 1325 1346 1326 1347 fi -
palm/trunk/SCRIPTS/mrun
r1941 r1944 22 22 # Current revisions: 23 23 # ------------------ 24 # 24 # adjustments for using HLRN ssh-keys 25 25 # 26 26 # Former revisions: … … 1183 1183 1184 1184 1185 # DETERMINE THE SSH-OPTION IN CASE THAT AN SSH-KEY IS EXPLICITLY GIVEN IN THE 1186 # CONFIG-FILE 1187 if [[ "$ssh_key" != "" ]] 1188 then 1189 ssh_key="-i $HOME/.ssh/$ssh_key" 1190 fi 1191 1192 1185 1193 # SET DEFAULT-QUEUE, IF NOT GIVEN 1186 1194 if [[ $queue = none ]] -
palm/trunk/SCRIPTS/subjob
r1941 r1944 23 23 # Current revisions: 24 24 # ------------------ 25 # 25 # adjustments for using HLRN ssh-keys 26 26 # 27 27 # Former revisions: … … 1594 1594 scp $PORTOPT $job_to_send ${remote_user}@136.172.44.205:${job_catalog}/$job_on_remhost 1595 1595 else 1596 scp $ PORTOPT $job_to_send ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost1596 scp $ssh_key $PORTOPT $job_to_send ${remote_user}@${remote_address}:${job_catalog}/$job_on_remhost 1597 1597 fi 1598 1598 if [[ $? = 1 ]] … … 1624 1624 /usr/bin/ssh $SSH_PORTOPT $remote_address -l $remote_user "$init_cmds $module_calls cd $job_catalog; $submcom $job_on_remhost" 1625 1625 else 1626 ssh $ SSH_PORTOPT $remote_address -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost"1626 ssh $ssh_key $SSH_PORTOPT $remote_address -l $remote_user "cd $job_catalog; $submcom $job_on_remhost; rm $job_on_remhost" 1627 1627 fi 1628 1628
Note: See TracChangeset
for help on using the changeset viewer.