Module: check_mk
Branch: master
Commit: 0eeb635ebb5275ebae902c132b737528ff96d174
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0eeb635ebb5275…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 17 13:20:00 2018 +0200
RPMs: Only try to cleanup legacy things from /etc/fstab in case it exists
Change-Id: I87037397dd601ca76f63dae6fd08ce064ef30d22
---
omd/omd.spec.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/omd/omd.spec.in b/omd/omd.spec.in
index a746cd0..fc11f34 100644
--- a/omd/omd.spec.in
+++ b/omd/omd.spec.in
@@ -148,7 +148,9 @@ chkconfig --add @APACHE_NAME@ >/dev/null 2>&1
chkconfig @APACHE_NAME@ on >/dev/null 2>&1
# RHEL / CENTOS >= 6.4, remove symlinks from existing sites in /etc/fstab
-sed -i "s/^tmpfs \/omd\/sites/tmpfs \/opt\/omd\/sites/" /etc/fstab
+if [ -e /etc/fstab ]; then
+ sed -i "s/^tmpfs \/omd\/sites/tmpfs \/opt\/omd\/sites/" /etc/fstab
+fi
# ensure apache is running
service @APACHE_NAME@ start >/dev/null 2>&1