IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38180


Ignore:
Timestamp:
Apr 24, 2015, 11:25:28 AM (11 years ago)
Author:
watersc1
Message:

Fix to make the exec/poll commands scp when they should.

Location:
trunk/ippScripts/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/sc_remote_exec.pl

    r38168 r38180  
    9595# Hard coded values
    9696my $DMZ_HOST = $remote_recipe{DMZ_HOST};
    97 my @SEC_HOSTS= @{ $remote_recipe{SEC_HOST} };
    98 my $SEC_HOST;
    99 if ($#SEC_HOSTS != -1) {
    100     $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
    101 }
    102 else {
    103     $SEC_HOST = '';
     97my @SEC_HOSTS = ();
     98my $SEC_HOST = '';
     99
     100if (defined($remote_recipe{SEC_HOST})) {
     101    @SEC_HOSTS = @{ $remote_recipe{SEC_HOST} };
     102    if ($#SEC_HOSTS != -1) {
     103       
     104        $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
     105    }
     106    else {
     107        $SEC_HOST = '';
     108    }
    104109}
    105110my $IPP_PATH = $remote_recipe{IPP_PATH};
     
    201206    }
    202207    else {
    203         $cmd = "$ssh -n $DMZ_HOST $cmd";
     208        $cmd = "$scp $file $DMZ_HOST:${destination}";
    204209    }
    205210
     
    223228    }
    224229    else {
    225         $cmd = "$ssh -n $DMZ_HOST $cmd";
     230        $cmd = "$scp $DMZ_HOST:${destination}  $file";
    226231    }
    227232
  • trunk/ippScripts/scripts/sc_remote_poll.pl

    r38168 r38180  
    116116# Hard coded values
    117117my $DMZ_HOST = $remote_recipe{DMZ_HOST};
    118 my @SEC_HOSTS= @{ $remote_recipe{SEC_HOST} };
    119 my $SEC_HOST;
    120 if ($#SEC_HOSTS != -1) {
    121     $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
    122 }
    123 else {
    124     $SEC_HOST = '';
     118my @SEC_HOSTS = ();
     119my $SEC_HOST = '';
     120
     121if (defined($remote_recipe{SEC_HOST})) {
     122    @SEC_HOSTS = @{ $remote_recipe{SEC_HOST} };
     123    if ($#SEC_HOSTS != -1) {
     124        $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
     125    }
     126    else {
     127        $SEC_HOST = '';
     128    }
    125129}
    126130my $IPP_PATH = $remote_recipe{IPP_PATH};
     
    434438    }
    435439    else {
    436         $cmd = "$scp $file ${DMZ_HOST}:${destination}";
     440        $cmd = "$scp  ${DMZ_HOST}:${destination} $file";
    437441    }
    438442
Note: See TracChangeset for help on using the changeset viewer.