From 27228998077d57c5b4dd0710e22fa61bdcdc732c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 26 Jun 2019 14:21:24 +0200 Subject: [PATCH] 5to6: fix ssh config check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in case the config file does not exist at all. Signed-off-by: Fabian Grünbichler --- PVE/CLI/pve5to6.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm index e5732681..65d104f9 100644 --- a/PVE/CLI/pve5to6.pm +++ b/PVE/CLI/pve5to6.pm @@ -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.")