[Pkg-nagios-changes] [pkg-nagios] r1744 - nagios3/trunk/debian
Alexander Wirt
formorer at alioth.debian.org
Sat Sep 5 13:59:29 UTC 2009
Author: formorer
Date: 2009-09-05 13:59:29 +0000 (Sat, 05 Sep 2009)
New Revision: 1744
Added:
nagios3/trunk/debian/nagios3-cgi.config
Removed:
nagios3/trunk/debian/nagios3-common.config
Modified:
nagios3/trunk/debian/nagios3-common.install
Log:
Fix webapp stuff
Copied: nagios3/trunk/debian/nagios3-cgi.config (from rev 1743, nagios3/trunk/debian/nagios3-common.config)
===================================================================
--- nagios3/trunk/debian/nagios3-cgi.config (rev 0)
+++ nagios3/trunk/debian/nagios3-cgi.config 2009-09-05 13:59:29 UTC (rev 1744)
@@ -0,0 +1,68 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+# (taken from the webapps-common httpd functions)
+# wc_httpd_installed: test for installed httpds
+# usage:
+# wc_httpd_installed [ httpd1 httpd2 ... ]
+#
+# no arguments implies to test for all servers
+wc_httpd_installed(){
+ local httpds
+ if [ "$*" ]; then
+ httpds=$*
+ else
+ httpds=$wc_httpd_supported
+ fi
+ for f in $httpds; do
+ if test -x /usr/sbin/$f; then
+ echo $f
+ fi
+ done
+}
+
+
+# list of installed servers to check for
+default_servers=`wc_httpd_installed apache2 apache apache-ssl apache-perl`
+# convert list to comma seperated list
+server_list=`echo $default_servers | sed -e 's/[[:space:]][[:space:]]*/, /g'`
+
+# if they haven't already been prompted, preseed the server selection
+db_fget nagios3/httpd seen
+if [ "$RET" = "false" ]; then
+ db_set nagios3/httpd $server_list
+fi
+
+db_input medium nagios3/httpd || true
+db_go || true
+db_get nagios3/httpd
+keepgoing="$RET"
+
+if [ "$keepgoing" ]; then
+ db_input medium nagios3/nagios1-in-apacheconf || true
+
+ # the passwords are reset at the end of every postinst run,
+ # however, they are left in the "seen" state so that the
+ # admin is not prompted for them at every upgrade.
+ while [ ! "$passwordsmatch" ]; do
+ #only ask for a password if no htpasswd exists
+ test -f /etc/nagios3/htpasswd.users && break
+ db_input high nagios3/adminpassword || true
+ db_input high nagios3/adminpassword-repeat || true
+ db_go || true
+ db_get nagios3/adminpassword
+ p1="$RET"
+ db_get nagios3/adminpassword-repeat
+ p2="$RET"
+ if [ "$p1" = "$p2" ]; then
+ passwordsmatch="yes"
+ else
+ db_fset nagios3/adminpassword seen false
+ db_fset nagios3/adminpassword-repeat seen false
+ db_fset nagios3/adminpassword-mismatch seen false
+ db_input critical nagios3/adminpassword-mismatch || true
+ fi
+ done
+fi
+db_go || true
Deleted: nagios3/trunk/debian/nagios3-common.config
===================================================================
--- nagios3/trunk/debian/nagios3-common.config 2009-09-05 13:59:27 UTC (rev 1743)
+++ nagios3/trunk/debian/nagios3-common.config 2009-09-05 13:59:29 UTC (rev 1744)
@@ -1,68 +0,0 @@
-#!/bin/sh -e
-
-. /usr/share/debconf/confmodule
-
-# (taken from the webapps-common httpd functions)
-# wc_httpd_installed: test for installed httpds
-# usage:
-# wc_httpd_installed [ httpd1 httpd2 ... ]
-#
-# no arguments implies to test for all servers
-wc_httpd_installed(){
- local httpds
- if [ "$*" ]; then
- httpds=$*
- else
- httpds=$wc_httpd_supported
- fi
- for f in $httpds; do
- if test -x /usr/sbin/$f; then
- echo $f
- fi
- done
-}
-
-
-# list of installed servers to check for
-default_servers=`wc_httpd_installed apache2 apache apache-ssl apache-perl`
-# convert list to comma seperated list
-server_list=`echo $default_servers | sed -e 's/[[:space:]][[:space:]]*/, /g'`
-
-# if they haven't already been prompted, preseed the server selection
-db_fget nagios3/httpd seen
-if [ "$RET" = "false" ]; then
- db_set nagios3/httpd $server_list
-fi
-
-db_input medium nagios3/httpd || true
-db_go || true
-db_get nagios3/httpd
-keepgoing="$RET"
-
-if [ "$keepgoing" ]; then
- db_input medium nagios3/nagios1-in-apacheconf || true
-
- # the passwords are reset at the end of every postinst run,
- # however, they are left in the "seen" state so that the
- # admin is not prompted for them at every upgrade.
- while [ ! "$passwordsmatch" ]; do
- #only ask for a password if no htpasswd exists
- test -f /etc/nagios3/htpasswd.users && break
- db_input high nagios3/adminpassword || true
- db_input high nagios3/adminpassword-repeat || true
- db_go || true
- db_get nagios3/adminpassword
- p1="$RET"
- db_get nagios3/adminpassword-repeat
- p2="$RET"
- if [ "$p1" = "$p2" ]; then
- passwordsmatch="yes"
- else
- db_fset nagios3/adminpassword seen false
- db_fset nagios3/adminpassword-repeat seen false
- db_fset nagios3/adminpassword-mismatch seen false
- db_input critical nagios3/adminpassword-mismatch || true
- fi
- done
-fi
-db_go || true
Modified: nagios3/trunk/debian/nagios3-common.install
===================================================================
--- nagios3/trunk/debian/nagios3-common.install 2009-09-05 13:59:27 UTC (rev 1743)
+++ nagios3/trunk/debian/nagios3-common.install 2009-09-05 13:59:29 UTC (rev 1744)
@@ -5,7 +5,6 @@
sample-config/*.cfg /usr/share/doc/nagios3-common/examples
sample-config/template-object/README /usr/share/doc/nagios3-common/examples/template-object
sample-config/template-object/*.cfg /usr/share/doc/nagios3-common/examples/template-object
-debian/httpd.webapps-common /usr/share/nagios3/debian
debian/lintian/overrides/nagios3-common usr/share/lintian/overrides
debian/gateway.cfg usr/share/nagios3/debian
contrib/eventhandlers/* usr/share/nagios3/plugins/eventhandlers
More information about the Pkg-nagios-changes
mailing list