another ucf fix
This commit is contained in:
parent
398bf9d4c0
commit
24af972d61
9
debian/functions
vendored
9
debian/functions
vendored
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue