Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---

New in v2.

 PVE/CLI/pve6to7.pm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/PVE/CLI/pve6to7.pm b/PVE/CLI/pve6to7.pm
index b8263dab..f486ac2d 100644
--- a/PVE/CLI/pve6to7.pm
+++ b/PVE/CLI/pve6to7.pm
@@ -574,6 +574,27 @@ sub check_backup_retention_settings {
     log_pass("no problems found.") if $pass;
 }
 
+sub check_cifs_credential_location {
+    log_info("checking CIFS credential location..");
+
+    my $regex = qr/^(.*)\.cred$/;
+
+    my $found;
+
+    PVE::Tools::dir_glob_foreach('/etc/pve/priv/', $regex, sub {
+       my ($filename) = @_;
+
+       my ($basename) = $filename =~ $regex;
+
+       log_warn("CIFS credentials '/etc/pve/priv/$filename' will be moved to " 
.
+           "'/etc/pve/priv/storage/$basename.pw' during the update");
+
+       $found = 1;
+    });
+
+    log_pass("no CIFS credentials at outdated location found.") if !$found;
+}
+
 sub check_misc {
     print_header("MISCELLANEOUS CHECKS");
     my $ssh_config = eval { PVE::Tools::file_get_contents('/root/.ssh/config') 
};
@@ -665,6 +686,7 @@ sub check_misc {
     }
 
     check_backup_retention_settings();
+    check_cifs_credential_location();
 }
 
 __PACKAGE__->register_method ({
-- 
2.20.1



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to