Module: check_mk
Branch: master
Commit: a4097b915eab638132b17fe2f5559c5e5f224bfd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a4097b915eab63…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 21 13:24:37 2019 +0100
omd umount: Test for mount before trying to unmount
Change-Id: I64f95f38462e5fdffc7d69b902a0ed77a993f56c
---
omd/packages/omd/omdlib/main.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/omd/packages/omd/omdlib/main.py b/omd/packages/omd/omdlib/main.py
index 585362b..fd387b9 100644
--- a/omd/packages/omd/omdlib/main.py
+++ b/omd/packages/omd/omdlib/main.py
@@ -1699,6 +1699,11 @@ def unmount_tmpfs(site, output=True, kill=False):
sys.stdout.write("Unmounting temporary filesystem...")
for _t in range(0, 10):
+ if not tmpfs_mounted(site.name):
+ if output:
+ ok()
+ return True
+
if subprocess.call(["umount", site.tmp_dir]) == 0:
if output:
ok()