[pve-devel] r6436 - pve-cluster/trunk/data/PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Aug 9 08:39:09 CEST 2011


Author: dietmar
Date: 2011-08-09 08:39:09 +0200 (Tue, 09 Aug 2011)
New Revision: 6436

Modified:
   pve-cluster/trunk/data/PVE/Cluster.pm
Log:
check if file exists


Modified: pve-cluster/trunk/data/PVE/Cluster.pm
===================================================================
--- pve-cluster/trunk/data/PVE/Cluster.pm	2011-08-09 06:22:17 UTC (rev 6435)
+++ pve-cluster/trunk/data/PVE/Cluster.pm	2011-08-09 06:39:09 UTC (rev 6436)
@@ -994,8 +994,11 @@
 
     my $old = PVE::Tools::file_get_contents($sshknownhosts, 128*1024); 
     
-    my $new = PVE::Tools::file_get_contents($sshrootknownhosts, 128*1024);
+    my $new = '';
 
+    $new = PVE::Tools::file_get_contents($sshrootknownhosts, 128*1024)
+	if -f $sshrootknownhosts;
+
     my $data = '';
 
     my $vhash = {};




More information about the pve-devel mailing list