[pve-devel] [PATCH cluster] create known_hosts symlink on join

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Apr 20 10:17:10 CEST 2018


On 4/11/18 9:45 AM, Wolfgang Bumiller wrote:
> applied, but it looks like the parameter was supposed to be removed
> entirely? It's always 1 now, ...

Yes, we could use something like (removing the param not included in patch):

----8<----
diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm
index ef7a541..f630b25 100644
--- a/data/PVE/Cluster.pm
+++ b/data/PVE/Cluster.pm
@@ -1309,7 +1309,7 @@ sub ssh_merge_known_hosts {

     PVE::Tools::file_set_contents($sshknownhosts, $data);

-    return if !$createLink;
+    return if -l $sshglobalknownhosts && readlink($sshglobalknownhosts) eq $sshknownhosts;

     unlink $sshglobalknownhosts;
     symlink $sshknownhosts, $sshglobalknownhosts;




More information about the pve-devel mailing list