]> git.proxmox.com Git - pve-cluster.git/commitdiff
add sshinfo_to_command_base
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 6 Jun 2017 08:03:57 +0000 (10:03 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 9 Jun 2017 10:23:14 +0000 (12:23 +0200)
required for rsync's --rsh

data/PVE/Cluster.pm

index 731acc5033711857ab828a6124ee8c89c831921d..05897ed69e19fad228aec5f6a2983513e832143c 100644 (file)
@@ -1877,15 +1877,21 @@ sub get_ssh_info {
     };
 }
 
-sub ssh_info_to_command {
+sub ssh_info_to_command_base {
     my ($info, @extra_options) = @_;
     return [
        '/usr/bin/ssh',
        '-o', 'BatchMode=yes',
        '-o', 'HostKeyAlias='.$info->{name},
-       @extra_options,
-       "root\@$info->{ip}"
+       @extra_options
     ];
 }
 
+sub ssh_info_to_command {
+    my ($info, @extra_options) = @_;
+    my $cmd = ssh_info_to_command_base($info, @extra_options);
+    push @$cmd, "root\@$info->{ip}";
+    return $cmd;
+}
+
 1;