[Pkg-nagios-changes] [SCM] debian packaging of icinga(-core) branch, master, updated. debian/1.6.1-2-3-g548ece5

Alexander Wirt formorer at debian.org
Thu Jan 19 07:18:38 UTC 2012


The following commit has been merged in the master branch:
commit 548ece5e54e5c66537c327df35f22dffee9455ab
Author: Daniel Baumann <daniel.baumann at progress-linux.org>
Date:   Tue Sep 13 13:17:33 2011 +0200

    Adding debconf handling for icinga check_external_commands option (Closes: #592738).

diff --git a/debian/icinga-common.config b/debian/icinga-common.config
new file mode 100644
index 0000000..bd3cd4a
--- /dev/null
+++ b/debian/icinga-common.config
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+conffile="/etc/icinga/icinga.cfg"
+
+if [ -e "$conffile" ]; then
+	check_external_commands="$(grep -E '^ *check_external_commands=' $conffile | sed -e 's|.*check_external_commands=||')"
+
+	# translate icinga option into debconf boolean
+	# (this is better than using a select in debconf with Choices-C,
+	# otherwise all translators would need to translate 'yes' and 'no').
+
+	case $check_external_commands in
+		0)
+			check_external_commands=false
+			;;
+
+		1)
+			check_external_commands=true
+			;;
+	esac
+
+	db_set icinga/check_external_commands $check_external_commands
+fi
+
+db_input low icinga/check_external_commands || true
+db_go || true
diff --git a/debian/icinga-common.postinst b/debian/icinga-common.postinst
index a8dda27..af0ae57 100644
--- a/debian/icinga-common.postinst
+++ b/debian/icinga-common.postinst
@@ -9,6 +9,8 @@ usn="/usr/share/icinga"
 
 . /usr/share/debconf/confmodule
 
+conffile="/etc/icinga/icinga.cfg"
+
 if [ -n "$ICINGADEBUG" ]; then
   echo "now debugging $0 $@"
   set -x
@@ -47,7 +49,72 @@ case "$1" in
         setperm nagios www-data 02750 /var/cache/icinga
         setperm nagios www-data 0700 /var/lib/icinga/rw
 
+	db_get icinga/check_external_commands
+	check_external_commands="$RET" # boolean
+
 	db_stop
+
+	# translate debconf boolean into icinga option
+	# (this is better than using a select in debconf with Choices-C,
+	# otherwise all translators would need to translate 'yes' and 'no').
+
+	case $check_external_commands in
+		true)
+			check_external_commands=1
+			;;
+
+		false)
+			check_external_commands=0
+			;;
+	esac
+
+	cp -a -f "$conffile" "$conffile".tmp
+
+	# If the admin deleted or commented some variables but then set
+	# them via debconf, (re-)add them to the config file.
+
+	test -z "$check_external_commands" || \
+	grep -Eq '^ *check_external_commands=' "$conffile" || \
+	echo "check_external_commands=" >> "$conffile"
+
+	sed -e "s|^ *check_external_commands=.*|check_external_commands=$check_external_commands|" \
+	< "$conffile" > "$conffile.tmp"
+
+	mv -f "$conffile".tmp "$conffile"
+
+	# Stop a not already stopped icinga instance,
+	# debhelper will start it again automatically at the bottom
+	status="$(/etc/init.d/icinga status >/dev/null 2>&1; echo $?)"
+
+	if [ "$status" -ne 3 ]; then
+		if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
+			invoke-rc.d icinga stop || true
+		else
+			/etc/init.d/icinga stop || true
+		fi
+	fi
+
+	case $check_external_commands in
+		1)
+			if ! dpkg-statoverride --list /var/lib/icinga/rw >/dev/null 2>&1; then
+				dpkg-statoverride --quiet --update --add nagios www-data 2710 /var/lib/icinga/rw
+			fi
+
+			if ! dpkg-statoverride --list /var/lib/icinga >/dev/null 2>&1; then
+				dpkg-statoverride --quiet --update --add nagios nagios 751 /var/lib/icinga
+			fi
+			;;
+
+		0)
+			if dpkg-statoverride --list /var/lib/icinga/rw >/dev/null 2>&1; then
+				dpkg-statoverride --quiet --remove /var/lib/icinga/rw
+			fi
+
+			if dpkg-statoverride --list /var/lib/icinga >/dev/null 2>&1; then
+				dpkg-statoverride --quiet --remove /var/lib/icinga
+			fi
+			;;
+	esac
     ;;
   abort-upgrade|abort-remove|abort-deconfigure)
     ;;
diff --git a/debian/icinga-common.templates b/debian/icinga-common.templates
new file mode 100644
index 0000000..2b2fb76
--- /dev/null
+++ b/debian/icinga-common.templates
@@ -0,0 +1,10 @@
+Template: icinga/check_external_commands
+Type: boolean
+Default: false
+_Description: Icinga check external commands:
+ Icinga is not configured to look for external commands in the default
+ configuration as a security feature. Enabling external commands will give
+ the web server write access to the nagios command pipe and is required
+ if you want to be able to use the CGI command interface.
+ .
+ If unsure, choose no.
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
index 1aef288..9a66ae4 100644
--- a/debian/po/POTFILES.in
+++ b/debian/po/POTFILES.in
@@ -1 +1,2 @@
 [type: gettext/rfc822deb] icinga-cgi.templates
+[type: gettext/rfc822deb] icinga-common.templates
diff --git a/debian/po/cs.po b/debian/po/cs.po
index 3e00192..e44bc22 100644
--- a/debian/po/cs.po
+++ b/debian/po/cs.po
@@ -87,6 +87,28 @@ msgstr "Chyba zadání hesla"
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "Zadaná hesla nesouhlasí. Zkuste to prosím znovu."
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
+
 #~ msgid "Password confirmation:"
 #~ msgstr "Potvrzení hesla:"
 
diff --git a/debian/po/da.po b/debian/po/da.po
index 7b15aa0..c126a1a 100644
--- a/debian/po/da.po
+++ b/debian/po/da.po
@@ -91,3 +91,25 @@ msgstr "Inddatafejl for adgangskode"
 #: ../icinga-cgi.templates:5001
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "De to adgangskoder du indtastede var ikke ens. Forsøg igen."
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/de.po b/debian/po/de.po
index a30fdb5..3151e22 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -93,3 +93,25 @@ msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
 "Die beiden Passwörter, die Sie eingegeben haben, sind nicht gleich. Bitte "
 "versuchen Sie es noch einmal."
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/es.po b/debian/po/es.po
index af3b4fb..b5c07c8 100644
--- a/debian/po/es.po
+++ b/debian/po/es.po
@@ -117,3 +117,25 @@ msgstr "Se ha detectado un fallo al introducir la contraseña"
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
 "Las dos contraseñas que ha introducido no son idénticas. Inténtelo otra vez."
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/eu.po b/debian/po/eu.po
index 9e9790a..42d8f7c 100644
--- a/debian/po/eu.po
+++ b/debian/po/eu.po
@@ -93,3 +93,25 @@ msgstr "Errorea pasahitzean"
 #: ../icinga-cgi.templates:5001
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "Idatzitako bi pasahitzak ez dira berdinak. Saiatu berriro."
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/fi.po b/debian/po/fi.po
index a714914..f44ad10 100644
--- a/debian/po/fi.po
+++ b/debian/po/fi.po
@@ -100,6 +100,28 @@ msgstr ""
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
+
 #~ msgid "Password confirmation:"
 #~ msgstr "Salasanan vahvistus:"
 
diff --git a/debian/po/fr.po b/debian/po/fr.po
index 856b7e6..64def72 100644
--- a/debian/po/fr.po
+++ b/debian/po/fr.po
@@ -95,6 +95,28 @@ msgstr ""
 "Les deux mots de passe que vous avez entrés sont différents. Veuillez "
 "recommencer."
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
+
 #~ msgid "Password confirmation:"
 #~ msgstr "Confirmation du mot de passe :"
 
diff --git a/debian/po/it.po b/debian/po/it.po
index bd9c795..08c7aab 100644
--- a/debian/po/it.po
+++ b/debian/po/it.po
@@ -90,3 +90,25 @@ msgstr "Password errata"
 #: ../icinga-cgi.templates:5001
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "Le due password sono diverse. Riprovare."
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/ja.po b/debian/po/ja.po
index 17e7a5b..84fd433 100644
--- a/debian/po/ja.po
+++ b/debian/po/ja.po
@@ -90,3 +90,24 @@ msgstr "パスワード入力エラー"
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "入力された 2 つのパスワードが一致しません。もう一度入力してください。"
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/pl.po b/debian/po/pl.po
index 7f8851a..4ee3da4 100644
--- a/debian/po/pl.po
+++ b/debian/po/pl.po
@@ -105,6 +105,28 @@ msgstr ""
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
+
 #~ msgid "Password confirmation:"
 #~ msgstr "Potwierdzenie hasła:"
 
diff --git a/debian/po/pt.po b/debian/po/pt.po
index b736927..3b663c4 100644
--- a/debian/po/pt.po
+++ b/debian/po/pt.po
@@ -97,6 +97,28 @@ msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
 "As duas palavras-passe que inseriu não são iguais. Por favor tente de novo."
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
+
 #~ msgid "Password confirmation:"
 #~ msgstr "Confirmação da password:"
 
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
index eafecec..bcae336 100644
--- a/debian/po/pt_BR.po
+++ b/debian/po/pt_BR.po
@@ -96,6 +96,28 @@ msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
 "As duas senhas informadas não foram as mesmas. Tente novamente, por favor."
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
+
 #~ msgid "Password confirmation:"
 #~ msgstr "Confirmação de senha:"
 
diff --git a/debian/po/ru.po b/debian/po/ru.po
index 541ee84..d9a179a 100644
--- a/debian/po/ru.po
+++ b/debian/po/ru.po
@@ -90,3 +90,25 @@ msgstr "Ошибка ввода пароля"
 #: ../icinga-cgi.templates:5001
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "Введённые пароли не совпали. Попробуйте ещё раз."
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/sv.po b/debian/po/sv.po
index 74c3749..dcc25e5 100644
--- a/debian/po/sv.po
+++ b/debian/po/sv.po
@@ -92,6 +92,28 @@ msgstr "Fel vid inmatning av lösenord"
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "Lösenorden stämde inte överrens. Försök igen."
 
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
+
 #~ msgid "Password confirmation:"
 #~ msgstr "Upprepa lösenordet:"
 
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index 5fd2f5e..8ba4d35 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -83,3 +83,25 @@ msgstr ""
 #: ../icinga-cgi.templates:5001
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""
diff --git a/debian/po/vi.po b/debian/po/vi.po
index 97b2368..90027af 100644
--- a/debian/po/vi.po
+++ b/debian/po/vi.po
@@ -88,3 +88,25 @@ msgstr "Lỗi nhập mật khẩu"
 #: ../icinga-cgi.templates:5001
 msgid "The two passwords you entered were not the same. Please try again."
 msgstr "Bạn đã nhập hai mật khẩu không trùng nhau. Hãy thử lại."
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "Icinga check external commands:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid ""
+"Icinga is not configured to look for external commands in the default "
+"configuration as a security feature. Enabling external commands will give "
+"the web server write access to the nagios command pipe and is required if "
+"you want to be able to use the CGI command interface."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../icinga-common.templates:1001
+msgid "If unsure, choose no."
+msgstr ""

-- 
debian packaging of icinga(-core)



More information about the Pkg-nagios-changes mailing list