[pmg-devel] [PATCH pmg-api 2/4] pmg7to8: notify about unmodified templates
Stoiko Ivanov
s.ivanov at proxmox.com
Fri Jul 7 18:54:26 CEST 2023
I considered making this a warning, but since unmodified files get
updated to the new versions in /var/lib/pmg/templates by ucf a notice
seems more appropriate.
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
src/PMG/CLI/pmg7to8.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/PMG/CLI/pmg7to8.pm b/src/PMG/CLI/pmg7to8.pm
index ea29056..1cb4e7f 100644
--- a/src/PMG/CLI/pmg7to8.pm
+++ b/src/PMG/CLI/pmg7to8.pm
@@ -552,6 +552,12 @@ sub check_misc {
check_apt_repos();
check_bootloader();
+
+ if (my $unmodified_templates = PMG::Utils::find_unmodified_templates()) {
+ my $msg = "Found templates in /etc/pmg/templates, without modification. Consider simply removing them: \n ";
+ $msg .= join("\n ", $unmodified_templates->@*);
+ log_notice($msg);
+ }
}
my sub colored_if {
--
2.39.2
More information about the pmg-devel
mailing list