[Pkg-nagios-changes] [pkg-nagios] r1075 -
nagios-plugins/trunk/debian
Sean Finney
seanius at alioth.debian.org
Wed Dec 6 23:33:38 CET 2006
Author: seanius
Date: 2006-12-06 23:33:38 +0100 (Wed, 06 Dec 2006)
New Revision: 1075
Modified:
nagios-plugins/trunk/debian/functions
Log:
another ucf fix
Modified: nagios-plugins/trunk/debian/functions
===================================================================
--- nagios-plugins/trunk/debian/functions 2006-12-06 21:55:29 UTC (rev 1074)
+++ nagios-plugins/trunk/debian/functions 2006-12-06 22:33:38 UTC (rev 1075)
@@ -19,18 +19,19 @@
# we have to do a little bit of hand-holding for sarge migrations...
# (called as "register_cfgs $2" from postinst)
register_cfgs(){
- local newinst
- if [ -z "$1" ]; then
+ # do this in a subshell so we don't screw up cwd
(
cd $templdir
for f in *cfg; do
dest=${npconfdir}/$f
- if is_pristine_sarge_file $f; then
+ # if this is a first-time install and there are
+ # existing files (i.e. upgrading from sarge),
+ # help migrate files without annoying ucf prompts
+ if [ -z "$1" ] && is_pristine_sarge_file $f; then
cp $f $dest
fi
ucf $f $dest
done
);
- fi
}
More information about the Pkg-nagios-changes
mailing list