From 0c37d63af5f3939f65ce12d80a934b02f9f1a152 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 18 Oct 2013 22:11:40 +0200 Subject: [PATCH] Rename i2enfeature/i2disfeature to icinga2-{enable,disable}-feature. fixes #4904 --- .../modules/icinga2/manifests/init.pp | 2 +- configure.ac | 2 +- doc/2.1-setting-up-icinga-2.md | 4 ++-- doc/2.2-setting-up-icinga-classic-ui.md | 8 ++++---- doc/2.4-setting-up-ido.md | 4 ++-- doc/2.5-setting-up-livestatus.md | 4 ++-- doc/2.6-running-icinga.md | 18 ++++++++--------- doc/3.08-external-commands.md | 2 +- doc/3.11-performance-data.md | 4 ++-- doc/3.12-status-data.md | 2 +- doc/3.13-compat-logging.md | 2 +- etc/icinga2/icinga2.conf | 2 +- icinga2.spec.in | 20 +++++++++---------- tools/.gitignore | 2 +- tools/Makefile.am | 6 +++--- ...enfeature.in => icinga2-enable-feature.in} | 10 +++++----- 16 files changed, 46 insertions(+), 46 deletions(-) rename tools/{i2enfeature.in => icinga2-enable-feature.in} (78%) diff --git a/.vagrant-puppet/modules/icinga2/manifests/init.pp b/.vagrant-puppet/modules/icinga2/manifests/init.pp index 8e410678c..524aed5eb 100644 --- a/.vagrant-puppet/modules/icinga2/manifests/init.pp +++ b/.vagrant-puppet/modules/icinga2/manifests/init.pp @@ -94,7 +94,7 @@ define icinga2::feature ($feature = $title) { exec { "icinga2-feature-${feature}": path => '/bin:/usr/bin:/sbin:/usr/sbin', unless => "readlink /etc/icinga2/features-enabled/${feature}.conf", - command => "i2enfeature ${feature}", + command => "icinga2-enable-feature ${feature}", require => [ Package['icinga2'] ], notify => Service['icinga2'] } diff --git a/configure.ac b/configure.ac index d17ba037f..18b847663 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,7 @@ third-party/execvpe/Makefile third-party/mmatch/Makefile tools/Makefile tools/migration/Makefile -tools/i2enfeature +tools/icinga2-enable-feature tools/mkembedconfig/Makefile ]) diff --git a/doc/2.1-setting-up-icinga-2.md b/doc/2.1-setting-up-icinga-2.md index 80b47ef32..c4280f3e7 100644 --- a/doc/2.1-setting-up-icinga-2.md +++ b/doc/2.1-setting-up-icinga-2.md @@ -85,13 +85,13 @@ and constants you can use to configure your services. /** * The features-available directory contains a number of configuration * files for features which can be enabled and disabled using the - * i2enfeature / i2disfeature tools. These two tools work by creating + * icinga2-enable-feature / icinga2-disable-feature tools. These two tools work by creating * and removing symbolic links in the features-enabled directory. */ include "features-enabled/*.conf" This include directive takes care of including the configuration files for all -the features which have been enabled with `i2enfeature`. See +the features which have been enabled with `icinga2-enable-feature`. See [Enabling/Disabling Features](#features) for more details. /** diff --git a/doc/2.2-setting-up-icinga-classic-ui.md b/doc/2.2-setting-up-icinga-classic-ui.md index e806cd0f7..ec1e6a2dc 100644 --- a/doc/2.2-setting-up-icinga-classic-ui.md +++ b/doc/2.2-setting-up-icinga-classic-ui.md @@ -31,11 +31,11 @@ Once you've built Classic UI you can install it: By default Icinga 2 does not write `status.dat` and `objects.cache` files which are used by the Classic UI. The command pipe is also not enabled by default. -You can use i2enfeature to enable these features: +You can use icinga2-enable-feature to enable these features: - # i2enfeature statusdata - # i2enfeature compatlog - # i2enfeature command + # icinga2-enable-feature statusdata + # icinga2-enable-feature compatlog + # icinga2-enable-feature command After enabling these features you will need to restart Icinga 2: diff --git a/doc/2.4-setting-up-ido.md b/doc/2.4-setting-up-ido.md index 8bf656d32..6e3412611 100644 --- a/doc/2.4-setting-up-ido.md +++ b/doc/2.4-setting-up-ido.md @@ -78,9 +78,9 @@ The package provides a new configuration file that is installed in `/etc/icinga2/features-available/ido-mysql.conf`. You will need to update the database credentials in this file. -You can enable the `ido-mysql` feature configuration file using `i2enfeature`: +You can enable the `ido-mysql` feature configuration file using `icinga2-enable-feature`: - # i2enfeature ido-mysql + # icinga2-enable-feature ido-mysql Module 'ido-mysql' was enabled. Make sure to restart Icinga 2 for these changes to take effect. diff --git a/doc/2.5-setting-up-livestatus.md b/doc/2.5-setting-up-livestatus.md index c45b3da7d..b7571dda5 100644 --- a/doc/2.5-setting-up-livestatus.md +++ b/doc/2.5-setting-up-livestatus.md @@ -8,9 +8,9 @@ The Livestatus component that is distributed as part of Icinga 2 is a re-implementation of the Livestatus protocol which is compatible with MK Livestatus. -You can enable Livestatus using i2enfeature: +You can enable Livestatus using icinga2-enable-feature: - # i2enfeature livestatus + # icinga2-enable-feature livestatus After that you will have to restart Icinga 2: diff --git a/doc/2.6-running-icinga.md b/doc/2.6-running-icinga.md index c5d427ddc..1905d558e 100644 --- a/doc/2.6-running-icinga.md +++ b/doc/2.6-running-icinga.md @@ -73,32 +73,32 @@ is returned. Icinga 2 provides configuration files for some commonly used features. These are installed in the `/etc/icinga2/features-available` directory and can be -enabled and disabled using the `i2enfeature` and `i2disfeature` tools, +enabled and disabled using the `icinga2-enable-feature` and `icinga2-disable-feature` tools, respectively. -The `i2enfeature` tool creates symlinks in the `/etc/icinga2/features-enabled` +The `icinga2-enable-feature` tool creates symlinks in the `/etc/icinga2/features-enabled` directory which is included by default in the example configuration file. You can view a list of available feature configuration files: - # i2enfeature - Syntax: i2enfeature + # icinga2-enable-feature + Syntax: icinga2-enable-feature Enables the specified feature. Available features: statusdata -Using the `i2enfeature` command you can enable features: +Using the `icinga2-enable-feature` command you can enable features: - # i2enfeature statusdata + # icinga2-enable-feature statusdata Module 'statusdata' was enabled. Make sure to restart Icinga 2 for these changes to take effect. -You can disable features using the `i2disfeature` command: +You can disable features using the `icinga2-disable-feature` command: - # i2disfeature statusdata + # icinga2-disable-feature statusdata Module 'statusdata' was disabled. Make sure to restart Icinga 2 for these changes to take effect. > **Note** > -> The `i2enfeature` and `i2disfeature` commands do not restart Icinga 2. +> The `icinga2-enable-feature` and `icinga2-disable-feature` commands do not restart Icinga 2. diff --git a/doc/3.08-external-commands.md b/doc/3.08-external-commands.md index 555dbabbb..b4ceb6157 100644 --- a/doc/3.08-external-commands.md +++ b/doc/3.08-external-commands.md @@ -7,7 +7,7 @@ through the web interface). In order to enable the `ExternalCommandListener` configuration use the following command and restart Icinga 2 afterwards: - # i2enfeature command + # icinga2-enable-feature command Icinga 2 creates the command pipe file as `/var/run/icinga2/cmd/icinga2.cmd` using the default configuration. diff --git a/doc/3.11-performance-data.md b/doc/3.11-performance-data.md index c1ba42702..bc14e2bdf 100644 --- a/doc/3.11-performance-data.md +++ b/doc/3.11-performance-data.md @@ -29,7 +29,7 @@ the output template format backed with Icinga 2 runtime macros. The default template is already provided with the Icinga 2 feature configuration which can be enabled using - # i2enfeature perfdata + # icinga2-enable-feature perfdata By default all performance data files are rotated in a 15 seconds interval into the `/var/spool/icinga2/perfdata/` directory as `service-perfdata.`. @@ -53,7 +53,7 @@ write these to the defined Graphite Carbon daemon tcp socket. You can enable the feature using - # i2enfeature graphite + # icinga2-enable-feature graphite The `GraphiteWriter` object expects the Graphite Carbon Cache socket listening at `127.0.0.1` on port `2003` by default. diff --git a/doc/3.12-status-data.md b/doc/3.12-status-data.md index 3d9e6e3f6..a74aa40ec 100644 --- a/doc/3.12-status-data.md +++ b/doc/3.12-status-data.md @@ -5,7 +5,7 @@ interval to its `objects.cache` and `status.dat` files. Icinga 2 provides the `StatusDataWriter` object which dumps all configuration objects and status updates in a regular interval. - # i2enfeature statusdata + # icinga2-enable-feature statusdata Icinga 1.x Classic UI requires this data set as part of its backend. diff --git a/doc/3.13-compat-logging.md b/doc/3.13-compat-logging.md index a319ccc98..cd160ebeb 100644 --- a/doc/3.13-compat-logging.md +++ b/doc/3.13-compat-logging.md @@ -9,7 +9,7 @@ sla reports and trends in Icinga 1.x Classic UI. The `CompatLogger` object can be enabled with - # i2enfeature compatlog + # icinga2-enable-feature compatlog By default, the Icinga 1.x log file called `icinga.log` is located in `/var/log/icinga2/compat`. Rotated log files are moved into diff --git a/etc/icinga2/icinga2.conf b/etc/icinga2/icinga2.conf index 2e36e65ad..b46935c43 100644 --- a/etc/icinga2/icinga2.conf +++ b/etc/icinga2/icinga2.conf @@ -12,7 +12,7 @@ include /** * The features-available directory contains a number of configuration * files for features which can be enabled and disabled using the - * i2enfeature / i2disfeature tools. These two tools work by creating + * icinga2-enable-feature / icinga2-disable-feature tools. These two tools work by creating * and removing symbolic links in the features-enabled directory. */ include "features-enabled/*.conf" diff --git a/icinga2.spec.in b/icinga2.spec.in index 694c67cf6..55751ab5f 100644 --- a/icinga2.spec.in +++ b/icinga2.spec.in @@ -192,30 +192,30 @@ exit 0 if [ ${1:-0} -eq 1 ] then # initial installation, enable ido-mysql feature - %{_sbindir}/i2enfeature ido-mysql + %{_sbindir}/icinga2-enable-feature ido-mysql fi %postun ido-mysql if [ "$1" = "0" ]; then # deinstallation of the package - remove feature - test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature ido-mysql + test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature ido-mysql fi %post classicui-config if [ ${1:-0} -eq 1 ] then # initial installation, enable features - %{_sbindir}/i2enfeature statusdata - %{_sbindir}/i2enfeature compatlog - %{_sbindir}/i2enfeature command + %{_sbindir}/icinga2-enable-feature statusdata + %{_sbindir}/icinga2-enable-feature compatlog + %{_sbindir}/icinga2-enable-feature command fi %postun classicui-config if [ "$1" = "0" ]; then # deinstallation of the package - remove feature - test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature statusdata - test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature compatlog - test -x %{_sbindir}/i2disfeature && %{_sbindir}/i2disfeature command + test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature statusdata + test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature compatlog + test -x %{_sbindir}/icinga2-disable-feature && %{_sbindir}/icinga2-disable-feature command fi %files @@ -232,8 +232,8 @@ fi %{_bindir}/icinga2-migrate-config %{_bindir}/icinga2-build-ca %{_bindir}/icinga2-build-key -%{_sbindir}/i2enfeature -%{_sbindir}/i2disfeature +%{_sbindir}/icinga2-enable-feature +%{_sbindir}/icinga2-disable-feature %exclude %{_libdir}/%{name}/libdb_ido_mysql* %{_libdir}/%{name} %{_datadir}/%{name} diff --git a/tools/.gitignore b/tools/.gitignore index 8c597eb39..0c832a80e 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -1 +1 @@ -i2enfeature +icinga2-enable-feature diff --git a/tools/Makefile.am b/tools/Makefile.am index 2d41a27e2..e41f1e141 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -2,10 +2,10 @@ SUBDIRS = \ migration \ mkembedconfig -sbin_SCRIPTS = i2enfeature +sbin_SCRIPTS = icinga2-enable-feature CLEANFILES = $(sbin_SCRIPTS) -EXTRA_DIST = i2enfeature.in +EXTRA_DIST = icinga2-enable-feature.in install-exec-hook: - $(LN_S) -f i2enfeature $(DESTDIR)$(sbindir)/i2disfeature + $(LN_S) -f icinga2-enable-feature $(DESTDIR)$(sbindir)/icinga2-disable-feature diff --git a/tools/i2enfeature.in b/tools/icinga2-enable-feature.in similarity index 78% rename from tools/i2enfeature.in rename to tools/icinga2-enable-feature.in index 9a55deb95..672a33fdf 100644 --- a/tools/i2enfeature.in +++ b/tools/icinga2-enable-feature.in @@ -10,15 +10,15 @@ ICINGA2CONFDIR=@sysconfdir@/icinga2 TOOL=$(basename -- $0) -if [ "$TOOL" != "i2enfeature" -a "$TOOL" != "i2disfeature" ]; then - echo "Invalid tool name ($TOOL). Should be 'i2enfeature' or 'i2disfeature'." +if [ "$TOOL" != "icinga2-enable-feature" -a "$TOOL" != "icinga2-disable-feature" ]; then + echo "Invalid tool name ($TOOL). Should be 'icinga2-enable-feature' or 'icinga2-disable-feature'." exit 1 fi if [ -z "$1" ]; then echo "Syntax: $0 " - if [ "$TOOL" = "i2enfeature" ]; then + if [ "$TOOL" = "icinga2-enable-feature" ]; then echo "Enables the specified feature." else echo "Disables the specified feature." @@ -43,7 +43,7 @@ if [ ! -e $ICINGA2CONFDIR/features-available/$FEATURE.conf ]; then exit 1 fi -if [ "$TOOL" = "i2enfeature" ]; then +if [ "$TOOL" = "icinga2-enable-feature" ]; then if [ -e $ICINGA2CONFDIR/features-enabled/$FEATURE.conf ]; then echo "The feature '$FEATURE' is already enabled." exit 0 @@ -52,7 +52,7 @@ if [ "$TOOL" = "i2enfeature" ]; then ln -s ../features-available/$FEATURE.conf $ICINGA2CONFDIR/features-enabled/ echo "Module '$FEATURE' was enabled." -elif [ "$TOOL" = "i2disfeature" ]; then +elif [ "$TOOL" = "icinga2-disable-feature" ]; then if [ ! -e $ICINGA2CONFDIR/features-enabled/$FEATURE.conf ]; then echo "The feature '$FEATURE' is already disabled." exit 0 -- 2.40.0