Module: check_mk
Branch: master
Commit: 08b0130b2c1da5573ece2cbd74663f6107ac8171
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=08b0130b2c1da5…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Thu Dec 14 16:04:55 2017 +0100
5415 FIX Make Windows section openhardwaremonitor backwards compatible
Version 1.4.0 'corrected' the naming of section openhardwaremonitor.
Unfortunately, this broke the backwards compatibility of old ini files
that still call this 'ohm'. The fix maps the old name to the new one
so that both old and new ini files work. Moreover, the agent bakery
was still writing ini files with the old name. Now the agent bakery
is also fixed.
Change-Id: I5adf3680c46c39c5833b5e39073064b1e2c74f5d
---
.werks/5415 | 17 +++++++++++++++++
agents/windows/SectionManager.cc | 2 +-
agents/windows/build_version | 2 +-
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/5415 b/.werks/5415
new file mode 100644
index 0000000..dbaab02
--- /dev/null
+++ b/.werks/5415
@@ -0,0 +1,17 @@
+Title: Make Windows section openhardwaremonitor backwards compatible
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i2
+Date: 1513263715
+Class: fix
+
+Version 1.4.0 'corrected' the naming of section openhardwaremonitor.
+Unfortunately, this broke the backwards compatibility of old ini files
+that still call this 'ohm'. The fix maps the old name to the new one
+so that both old and new ini files work. Moreover, the agent bakery
+was still writing ini files with the old name. Now the agent bakery
+is also fixed.
+
+
diff --git a/agents/windows/SectionManager.cc b/agents/windows/SectionManager.cc
index e0aa5e2..a548665 100644
--- a/agents/windows/SectionManager.cc
+++ b/agents/windows/SectionManager.cc
@@ -26,7 +26,7 @@ namespace {
// 'old' names to 'new' ones.
std::string mapSectionName(const std::string §ionName) {
const std::unordered_map<std::string, std::string> mappedSectionNames = {
- {"webservices", "wmi_webservices"}};
+ {"webservices", "wmi_webservices"}, {"ohm",
"openhardwaremonitor"}};
const auto it = mappedSectionNames.find(sectionName);
return it == mappedSectionNames.end() ? sectionName : it->second;
}
diff --git a/agents/windows/build_version b/agents/windows/build_version
index 71bfd5b..95a3b3e 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3024
+3026