From: Fabian Grünbichler Date: Fri, 10 Jun 2016 09:56:45 +0000 (+0200) Subject: cleanup calls to external programs X-Git-Url: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff_plain;h=4bd381e9b6b3ecc52e7649f6743c95a42afc01ab cleanup calls to external programs --- diff --git a/data/PVE/pvecm b/data/PVE/pvecm index cbd891d..612e906 100755 --- a/data/PVE/pvecm +++ b/data/PVE/pvecm @@ -398,9 +398,9 @@ __PACKAGE__->register_method ({ # make sure known_hosts is on local filesystem PVE::Cluster::ssh_unmerge_known_hosts(); - my $cmd = "ssh-copy-id -i /root/.ssh/id_rsa 'root\@$host' >/dev/null 2>&1"; - system ($cmd) == 0 || - die "unable to copy ssh ID\n"; + my $cmd = ['ssh-copy-id', '-i', '/root/.ssh/id_rsa', "root\@$host"]; + PVE::Tools::run_command($cmd, 'outfunc' => sub {}, 'errfunc' => sub {}, + 'errmsg' => "unable to copy ssh ID"); $cmd = ['ssh', $host, '-o', 'BatchMode=yes', 'pvecm', 'addnode', $nodename, '--force', 1];