Module: check_mk
Branch: master
Commit: 4f55fc54de4b16fd52930e6cb0708aaae25a1803
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4f55fc54de4b16…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 25 14:49:43 2015 +0100
#2160 FIX Fixed rename of hosts where a host with this name did exist before
---
.werks/2160 | 10 ++++++++++
ChangeLog | 1 +
modules/automation.py | 1 +
3 files changed, 12 insertions(+)
diff --git a/.werks/2160 b/.werks/2160
new file mode 100644
index 0000000..c9d4b30
--- /dev/null
+++ b/.werks/2160
@@ -0,0 +1,10 @@
+Title: Fixed rename of hosts where a host with this name did exist before
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1427291362
+
+
diff --git a/ChangeLog b/ChangeLog
index d661268..e1d1140 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -386,6 +386,7 @@
* 2047 FIX: Allow overriding existing WATO rules by own files in local/ hierarchy...
* 2146 FIX: In distributed environments user notification rules trigger a profile
synchronisation now...
* 2158 FIX: Condition column in WATO rule tables has now a flexible width...
+ * 2160 FIX: Fixed rename of hosts where a host with this name did exist before
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host
notications
diff --git a/modules/automation.py b/modules/automation.py
index f2044c7..294bac6 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -717,6 +717,7 @@ def automation_rename_host(args):
def rename_host_dir(basedir, oldname, newname):
+ import shutil
if os.path.exists(basedir + "/" + oldname):
if os.path.exists(basedir + "/" + newname):
shutil.rmtree(basedir + "/" + newname)