]> granicus.if.org Git - icinga2/commitdiff
Use icinga2-enable-feature's multi-argument functionality in the Debian/RPM packages.
authorGunnar Beutner <gunnar@beutner.name>
Tue, 27 May 2014 05:27:12 +0000 (07:27 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 27 May 2014 05:27:12 +0000 (07:27 +0200)
Refs #6315

debian/icinga2-classicui.postinst
debian/icinga2-common.postinst
icinga2.spec
tools/icinga2-enable-feature.cmake

index d50780c6644dd6b9e7a0724616a882d29e2c99c0..67636998c45db3aaa0375d2f27e6748987845cbd 100644 (file)
@@ -37,10 +37,7 @@ is_fresh_install()
 enable_features_for_classic() {
     if is_fresh_install $@; then
         echo "enabling icinga2 features for classicui"
-
-        for feature in compatlog statusdata command; do
-            icinga2-enable-feature $feature
-        done
+        icinga2-enable-feature compatlog statusdata command
 
         echo "reloading icinga2"
         [ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
index f0617644ea8f0a3d2e68b5f747d58b5f54ca9520..487f45a97afb37cf031e711c730c67022da215bc 100644 (file)
@@ -29,9 +29,7 @@ enable_default_features() {
     if is_fresh_install $@ \
        || dpkg --compare-versions "$2" lt "$FIX_VERSION"; then
         echo "enabling default icinga2 features"
-        for feature in checker notification mainlog; do
-            icinga2-enable-feature $feature
-        done
+        icinga2-enable-feature checker notification mainlog
     fi
     # handle new default features here in the future
 }
index 8ab13c44864fd60e5beda1326d7f19accc8c5d7f..8dac57a105aa86a24f21991aadc7c7bc356cc032 100644 (file)
@@ -282,9 +282,7 @@ exit 0
 if [ ${1:-0} -eq 1 ]
 then
        # initial installation, enable default features
-       %{_sbindir}/icinga2-enable-feature checker
-       %{_sbindir}/icinga2-enable-feature notification
-       %{_sbindir}/icinga2-enable-feature mainlog
+       %{_sbindir}/icinga2-enable-feature checker notification mainlog
 fi
 
 exit 0
@@ -311,9 +309,7 @@ exit 0
 if [ ${1:-0} -eq 1 ]
 then
        # initial installation, enable default features
-       %{_sbindir}/icinga2-enable-feature checker
-       %{_sbindir}/icinga2-enable-feature notification
-       %{_sbindir}/icinga2-enable-feature mainlog
+       %{_sbindir}/icinga2-enable-feature checker notification mainlog
 fi
 
 exit 0
@@ -376,9 +372,7 @@ exit 0
 if [ ${1:-0} -eq 1 ]
 then
         # initial installation, enable features
-        %{_sbindir}/icinga2-enable-feature statusdata
-        %{_sbindir}/icinga2-enable-feature compatlog
-        %{_sbindir}/icinga2-enable-feature command
+        %{_sbindir}/icinga2-enable-feature statusdata compatlog command
 fi
 
 exit 0
index c840ab0748306eaca322a034edc0e5063a42aedc..02f86f24a81e8e465137e75593b46e97d25d3ff0 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh 
+#!/bin/sh
 ICINGA2CONFDIR=@CMAKE_INSTALL_FULL_SYSCONFDIR@/icinga2
 
 TOOL=$(basename -- $0)