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...
|
# 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue