[Pkg-nagios-changes] [pkg-nagios] r1061 -
nagios-plugins/trunk/debian
Sean Finney
seanius at alioth.debian.org
Tue Dec 5 19:34:39 CET 2006
Author: seanius
Date: 2006-12-05 19:34:39 +0100 (Tue, 05 Dec 2006)
New Revision: 1061
Added:
nagios-plugins/trunk/debian/functions
Modified:
nagios-plugins/trunk/debian/changelog
nagios-plugins/trunk/debian/control
nagios-plugins/trunk/debian/nagios-plugins-basic.postinst
nagios-plugins/trunk/debian/nagios-plugins-standard.postinst
nagios-plugins/trunk/debian/rules
Log:
testing fix for conffile prompts
Modified: nagios-plugins/trunk/debian/changelog
===================================================================
--- nagios-plugins/trunk/debian/changelog 2006-12-05 18:26:31 UTC (rev 1060)
+++ nagios-plugins/trunk/debian/changelog 2006-12-05 18:34:39 UTC (rev 1061)
@@ -1,3 +1,10 @@
+nagios-plugins (1.4.5-2) UNRELEASED; urgency=low
+
+ * fix for spurious conffile-type prompts from ucf, thanks to
+ Stephen Gran for catching this (closes: #400595).
+
+ -- sean finney <seanius at debian.org> Tue, 05 Dec 2006 19:29:45 +0100
+
nagios-plugins (1.4.5-1) unstable; urgency=low
* new upstream (bugfix only) release. the following patches
Modified: nagios-plugins/trunk/debian/control
===================================================================
--- nagios-plugins/trunk/debian/control 2006-12-05 18:26:31 UTC (rev 1060)
+++ nagios-plugins/trunk/debian/control 2006-12-05 18:34:39 UTC (rev 1061)
@@ -56,7 +56,7 @@
Architecture: any
Conflicts: nagios-plugins (<= 1.4.2-3)
Replaces: nagios-plugins
-Depends: ${shlibs:Depends}, ${misc:Depends}, fping, qstat, snmp, radiusclient1, libnet-snmp-perl, dnsutils, bind9-host | host, smbclient, ucf
+Depends: ${shlibs:Depends}, ${misc:Depends}, fping, qstat, snmp, radiusclient1, libnet-snmp-perl, dnsutils, bind9-host | host, smbclient, ucf, nagios-plugins-basic
Suggests: nagios-text | nagios
Description: Plugins for the nagios network monitoring and management system
Nagios is a host/service/network monitoring and management system. It has
Added: nagios-plugins/trunk/debian/functions
===================================================================
--- nagios-plugins/trunk/debian/functions 2006-12-05 18:26:31 UTC (rev 1060)
+++ nagios-plugins/trunk/debian/functions 2006-12-05 18:34:39 UTC (rev 1061)
@@ -0,0 +1,26 @@
+# functions for use by nagios plugins maintainer scripts
+
+# called as "register_cfgs $2" from postinst
+register_cfgs(){
+ local newinst
+ if [ -z "$1" ]; then
+ newinst="yes"
+ tmpfile=`mktemp -t nagios-plugins.XXXXXX`
+ if [ ! -f "$tmpfile" ]; then
+ echo "error creating tempfile >&2"
+ exit 1
+ fi
+ fi
+ (
+ cd $templdir
+ for f in *cfg; do
+ dest=/etc/nagios-plugins/config/$f
+ if [ "$newinst" = "yes" ] && [ -f $dest ]; then
+ cat $dest > $tmpfile
+ ucf $tmpfile $dest
+ fi
+ ucf $f /etc/nagios-plugins/config/$f
+ done
+ );
+ if [ "$newinst" = "yes" ]; then rm -f $tmpfile; fi
+}
Modified: nagios-plugins/trunk/debian/nagios-plugins-basic.postinst
===================================================================
--- nagios-plugins/trunk/debian/nagios-plugins-basic.postinst 2006-12-05 18:26:31 UTC (rev 1060)
+++ nagios-plugins/trunk/debian/nagios-plugins-basic.postinst 2006-12-05 18:34:39 UTC (rev 1061)
@@ -1,12 +1,10 @@
#!/bin/sh -e
+templdir=/usr/share/nagios-plugins/templates-basic
+. /usr/share/nagios-plugins/dpkg/functions
+
if [ "$1" = "configure" ]; then
- (
- cd /usr/share/nagios-plugins/templates-basic
- for f in *cfg; do
- ucf $f /etc/nagios-plugins/config/$f
- done
- );
+ register_cfgs $2
fi
#DEBHELPER#
Modified: nagios-plugins/trunk/debian/nagios-plugins-standard.postinst
===================================================================
--- nagios-plugins/trunk/debian/nagios-plugins-standard.postinst 2006-12-05 18:26:31 UTC (rev 1060)
+++ nagios-plugins/trunk/debian/nagios-plugins-standard.postinst 2006-12-05 18:34:39 UTC (rev 1061)
@@ -1,12 +1,10 @@
#!/bin/sh -e
+. /usr/share/nagios-plugins/dpkg/functions
+templdir=/usr/share/nagios-plugins/templates-standard
+
if [ "$1" = "configure" ]; then
- (
- cd /usr/share/nagios-plugins/templates-standard
- for f in *cfg; do
- ucf $f /etc/nagios-plugins/config/$f
- done
- );
+ register_cfgs $2
fi
#DEBHELPER#
Modified: nagios-plugins/trunk/debian/rules
===================================================================
--- nagios-plugins/trunk/debian/rules 2006-12-05 18:26:31 UTC (rev 1060)
+++ nagios-plugins/trunk/debian/rules 2006-12-05 18:34:39 UTC (rev 1061)
@@ -150,6 +150,9 @@
sed -e 's/@STD_PLUGINS@/${std_plugin_cfgs}/' \
< debian/nagios-plugins-standard.postrm.in \
> debian/nagios-plugins-standard.postrm
+ # copy our dpkg-sourced functions into place
+ install -D $(CURDIR)/debian/functions \
+ ${NP_BASIC_DIR}/usr/share/nagios-plugins/dpkg/functions
# Build architecture-independent files here.
More information about the Pkg-nagios-changes
mailing list