testing fix for conffile prompts

This commit is contained in:
Sean Finney 2006-12-05 18:34:39 +00:00
parent 0ef129fa86
commit 5cc5d66652
6 changed files with 45 additions and 13 deletions

7
debian/changelog vendored
View file

@ -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@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

2
debian/control vendored
View file

@ -56,7 +56,7 @@ Package: nagios-plugins-standard
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

26
debian/functions vendored Normal file
View file

@ -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
}

View file

@ -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#

View file

@ -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#

3
debian/rules vendored
View file

@ -150,6 +150,9 @@ install: build
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.