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... # we have to do a little bit of hand-holding for sarge migrations...
# (called as "register_cfgs $2" from postinst) # (called as "register_cfgs $2" from postinst)
register_cfgs(){ register_cfgs(){
local newinst # do this in a subshell so we don't screw up cwd
if [ -z "$1" ]; then
( (
cd $templdir cd $templdir
for f in *cfg; do for f in *cfg; do
dest=${npconfdir}/$f 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 cp $f $dest
fi fi
ucf $f $dest ucf $f $dest
done done
); );
fi
} }