Module: check_mk
Branch: master
Commit: 2b5b9d6cfd84b80bab7eadfee852bd1561962d03
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b5b9d6cfd84b8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 3 16:13:09 2018 +0200
Fixed longer existing issue while disabling TMPFS using the re-added TMPFS config hook
The TMPFS option was not set to "off". Instead it was set to a config
value "Cleaning up temp filesystem...OK" because the hooks set mode
produced this output when working as expected.
Change-Id: Ic0a990d2f25209e2806edcf0b666dfbe22e87c34
---
omd/packages/omd/TMPFS.hook | 2 +-
omd/packages/omd/omd | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/omd/packages/omd/TMPFS.hook b/omd/packages/omd/TMPFS.hook
index 350221d..0ee379e 100755
--- a/omd/packages/omd/TMPFS.hook
+++ b/omd/packages/omd/TMPFS.hook
@@ -19,7 +19,7 @@ case "$1" in
set)
# Unmount the tmpfs when it was mounted before
if [ "$2" == "off" ]; then
- omd umount
+ omd umount >/dev/null
fi
;;
esac
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index ede9538..ea8da3e 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -1595,11 +1595,12 @@ def prepare_tmpfs(sitename, tmp):
return # Fine: Mounted
if g_site_conf["TMPFS"] != "on":
+ sys.stdout.write("Preparing tmp directory %s..." % tmp)
+ sys.stdout.flush()
+
if os.path.exists(tmp):
return
- sys.stdout.write("Preparing tmp directory %s..." % tmp)
- sys.stdout.flush()
try:
os.mkdir(tmp)
except OSError, e: