Module: check_mk
Branch: master
Commit: 3d4ba18ebefd25adb367bf2cb02be0be9f24bfbd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3d4ba18ebefd25…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri May 12 12:52:59 2017 +0200
4680 FIX Sync of local hierarchy (MKPs) preserves symlinks now
A WATO slave site can be configured to get all local files (e.g. created with MKPs)
of the master can be synced to the slave site. Previous versions were not copying
symlinks. Instead of it the link destination files were copied to the symlink
location.
Change-Id: I0c1ebbff3c4239719b6dc1118b7fb1db369e6ada
---
.werks/4680 | 13 +++++++++++++
web/htdocs/multitar.py | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/4680 b/.werks/4680
new file mode 100644
index 0000000..8975bc5
--- /dev/null
+++ b/.werks/4680
@@ -0,0 +1,13 @@
+Title: Sync of local hierarchy (MKPs) preserves symlinks now
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1494586265
+Class: fix
+
+A WATO slave site can be configured to get all local files (e.g. created with MKPs)
+of the master can be synced to the slave site. Previous versions were not copying
+symlinks. Instead of it the link destination files were copied to the symlink
+location.
diff --git a/web/htdocs/multitar.py b/web/htdocs/multitar.py
index 74aed7b..835036e 100644
--- a/web/htdocs/multitar.py
+++ b/web/htdocs/multitar.py
@@ -57,7 +57,7 @@ def create(filename, components):
exclude_args = list(itertools.chain.from_iterable([ ("--exclude",
f) for f in excludes ]))
subdata = subprocess.check_output(
- [ "tar", "cf", "-",
"--dereference", "--force-local" ]
+ [ "tar", "cf", "-",
"--force-local" ]
+ exclude_args
+ [ "-C", basedir, filename ]
)