another ucf fix

This commit is contained in:
Sean Finney 2006-12-06 22:33:38 +00:00
parent 398bf9d4c0
commit 24af972d61

9
debian/functions vendored
View file

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