[omd-commits] OMD Git: omd: make setup now also registers deb/ ubuntu alternatives switch for the development version

git version control git at mathias-kettner.de
Mon Sep 24 13:12:18 CEST 2012


Module:   omd
Branch:   master
Commit:   974bd4876f60367bc57bc65e1f5d510fc823b583
URL:      http://omdistro.org/projects/omd/repository/revisions/974bd4876f60367bc57bc65e1f5d510fc823b583

Author:   Lars Michelsen <lm at mathias-kettner.de>
Date:     Mon Sep 24 12:29:36 2012 +0200
Commiter: Lars Michelsen <lm at mathias-kettner.de>
Date:     Mon Sep 24 12:29:36 2012 +0200

make setup now also registers deb/ubuntu alternatives switch for the development version

---

 Makefile |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 458fe2d..7d73346 100644
--- a/Makefile
+++ b/Makefile
@@ -276,7 +276,7 @@ deb-snap: deb-environment
 	git checkout -- Makefile.omd packages/omd/omd
 
 # Only to be used for developement testing setup 
-setup: pack xzf
+setup: pack xzf alt
 
 # Only for development: install tarball below /
 xzf:
@@ -284,6 +284,16 @@ xzf:
 	chmod 4755 $(OMD_ROOT)/lib/nagios/plugins/check_{icmp,dhcp}
 	$(APACHE_CTL) -k graceful
 
+# On debian based systems register the alternative switches
+alt:
+	@if which update-alternatives >/dev/null 2>&1; then \
+	    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 \
+		--slave /usr/share/man/man8/omd.8.gz omd.man8 \
+               /omd/versions/$(OMD_VERSION)/share/man/man8/omd.8.gz ; \
+	fi ;
+
 version:
 	@if [ -z "$(VERSION)" ] ; then \
 	    newversion=$$(dialog --stdout --inputbox "New Version:" 0 0 "$(OMD_VERSION)") ; \



More information about the omd-commits mailing list