]> git.proxmox.com Git - pve-manager.git/commitdiff
5to6: fix ssh config check
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 26 Jun 2019 12:21:24 +0000 (14:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 26 Jun 2019 16:30:10 +0000 (18:30 +0200)
in case the config file does not exist at all.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/CLI/pve5to6.pm

index e573268164676144b4f0cb5fff788aa8611b1d9b..65d104f92221ab3a22ac8872e8efb21109cd4e0b 100644 (file)
@@ -312,8 +312,12 @@ sub check_ceph {
 sub check_misc {
     print "\nMISCELLANEOUS CHECKS\n\n";
     my $ssh_config = eval { PVE::Tools::file_get_contents('/root/.ssh/config') };
-    log_fail("Unsupported SSH Cipher configured for root in /root/.ssh/config: $1")
-       if $ssh_config =~ /^Ciphers .*(blowfish|arcfour|3des).*$/m;
+    if (defined($ssh_config)) {
+       log_fail("Unsupported SSH Cipher configured for root in /root/.ssh/config: $1")
+           if $ssh_config =~ /^Ciphers .*(blowfish|arcfour|3des).*$/m;
+    } else {
+       log_skip("No SSH config file found.");
+    }
 
     my $root_free = PVE::Tools::df('/', 10);
     log_warn("Less than 2G free space on root file system.")