Module: check_mk
Branch: master
Commit: 6030b408f5ceadf6f7e7cc70f05d98b58bfc6c99
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6030b408f5cead…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 2 10:29:34 2018 +0200
6279 FIX Fixed package installation when bash-completion is not installed
---
.werks/6279 | 10 ++++++++++
omd/debian/postinst.in | 3 +++
omd/omd.spec.in | 3 +++
3 files changed, 16 insertions(+)
diff --git a/.werks/6279 b/.werks/6279
new file mode 100644
index 0000000..2971079
--- /dev/null
+++ b/.werks/6279
@@ -0,0 +1,10 @@
+Title: Fixed package installation when bash-completion is not installed
+Level: 1
+Component: packages
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1530520145
+Class: fix
+
+
diff --git a/omd/debian/postinst.in b/omd/debian/postinst.in
index 50a7da5..c1e6b4e 100755
--- a/omd/debian/postinst.in
+++ b/omd/debian/postinst.in
@@ -42,6 +42,9 @@ setperm() {
case "$1" in
configure)
ln -sfn /opt/omd /omd
+ if [ ! -d /etc/bash_completion.d ]; then
+ mkdir /etc/bash_completion.d
+ fi
update-alternatives --install /omd/versions/default \
omd /omd/versions/###OMD_VERSION### ###OMD_SERIAL### \
--slave /usr/bin/omd omd.bin /omd/versions/###OMD_VERSION###/bin/omd \
diff --git a/omd/omd.spec.in b/omd/omd.spec.in
index b24691e..27f2879 100644
--- a/omd/omd.spec.in
+++ b/omd/omd.spec.in
@@ -81,6 +81,9 @@ ln -sfn "%{version}" /omd/versions/default
ln -sfn /omd/versions/default/bin/omd /usr/bin/omd
ln -sfn /omd/versions/default/share/man/man8/omd.8.gz /usr/share/man/man8/omd.8.gz
ln -sfn /omd/versions/default/share/omd/apache.conf @APACHE_CONFDIR@/zzz_omd.conf
+if [ ! -d /etc/bash_completion.d ]; then
+ mkdir /etc/bash_completion.d
+fi
ln -sfn /omd/versions/default/lib/omd/bash_completion /etc/bash_completion.d/omd.sh
IS_SYSTEMD=0