[Pkg-nagios-changes] [pkg-nagios-plugins] 53/413: another ucf fix
Jan Wagner
waja at moszumanska.debian.org
Tue Nov 26 23:13:05 UTC 2013
This is an automated email from the git hooks/post-receive script.
waja pushed a commit to branch master
in repository pkg-nagios-plugins.
commit 24af972d613aad54280f349c6460e6e46a351cd0
Author: Sean Finney <seanius at debian.org>
Date: Wed Dec 6 22:33:38 2006 +0000
another ucf fix
---
debian/functions | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/debian/functions b/debian/functions
index 7cf51da..0c883ab 100644
--- a/debian/functions
+++ b/debian/functions
@@ -19,18 +19,19 @@ is_pristine_sarge_file(){
# 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
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins.git
More information about the Pkg-nagios-changes
mailing list