Module: check_mk
Branch: master
Commit: 8991ce266ae1f171ee2b187d959f0c82f3c66768
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8991ce266ae1f1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 28 13:48:20 2015 +0200
Fixed missing error handling in msi-update\
---
agents/windows/msibuild/.f12 | 4 ++++
agents/windows/msibuild/msi-update | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/agents/windows/msibuild/.f12 b/agents/windows/msibuild/.f12
new file mode 100644
index 0000000..453e9db
--- /dev/null
+++ b/agents/windows/msibuild/.f12
@@ -0,0 +1,4 @@
+#!/bin/bash
+SITE=${SITE:-$(cat ../.site 2>/dev/null || true)}
+SITE=${SITE:-$(omd sites --bare | head -n 1)}
+sudo cp -p msi-update /omd/sites/$SITE/bin
diff --git a/agents/windows/msibuild/msi-update b/agents/windows/msibuild/msi-update
index 646d93a..993309c 100755
--- a/agents/windows/msibuild/msi-update
+++ b/agents/windows/msibuild/msi-update
@@ -97,9 +97,9 @@ try:
# Export required idt files into work dir
for entry in [ "File", "Property", "Component" ]:
verbose("Export table %s from file %s" % (entry, msi_file))
- os.system((path_prefix + "msiinfo export %(msi_file)s %(property)s >
%(work_dir)s/%(property)s.idt") % \
- { "work_dir" : work_dir, "msi_file": msi_file,
"property": entry })
-
+ if os.system((path_prefix + "msiinfo export %(msi_file)s %(property)s >
%(work_dir)s/%(property)s.idt") % \
+ { "work_dir" : work_dir, "msi_file": msi_file,
"property": entry }) != 0:
+ bail_out('Failed to unpack msi table %s from %s' % (entry,
msi_file))
verbose("Modify extracted files..")