[pve-devel] [PATCH manager stable-6] pve6to7: skip user.cfg if it does not exist

Dominik Csapak d.csapak at proxmox.com
Wed Jun 30 15:32:23 CEST 2021


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/CLI/pve6to7.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/PVE/CLI/pve6to7.pm b/PVE/CLI/pve6to7.pm
index 6dd7760c..1c89242d 100644
--- a/PVE/CLI/pve6to7.pm
+++ b/PVE/CLI/pve6to7.pm
@@ -608,6 +608,11 @@ sub check_cifs_credential_location {
 sub check_custom_pool_roles {
     log_info("Checking custom roles for pool permissions..");
 
+    if (! -f "/etc/pve/user.cfg") {
+	log_skip("user.cfg does not exist");
+	return;
+    }
+
     my $raw = eval { PVE::Tools::file_get_contents('/etc/pve/user.cfg'); };
     if ($@) {
 	log_fail("Failed to read '/etc/pve/user.cfg' - $@");
-- 
2.30.2






More information about the pve-devel mailing list