[Dbconfig-common-devel] dbconfig-common/dpkg common,1.8,1.9
seanius@haydn.debian.org
seanius@haydn.debian.org
Update of /cvsroot/dbconfig-common/dbconfig-common/dpkg
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv16097/dpkg
Modified Files:
common
Log Message:
package configuration files now in ucf control
Index: common
===================================================================
RCS file: /cvsroot/dbconfig-common/dbconfig-common/dpkg/common,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- common 25 Feb 2005 05:57:04 -0000 1.8
+++ common 3 Mar 2005 22:28:15 -0000 1.9
@@ -192,10 +192,12 @@
### dump package configuration to a config file
###
dbc_write_package_config(){
- local iformat ofile warn
+ local iformat ofile warn tfile
_dbc_sanity_check packageconfig || dbc_install_error
echo "dbconfig-common: writing config to $dbc_packageconfig" >&2
+ tfile=`mktemp -t dbconfig-package-config.XXXXXX`
+
# a quick check if this is a multi-dbtype app
if [ "$dbc_prompted_dbtype" ]; then
dbc_chosen_dbtype=$dbc_prompted_dbtype;
@@ -212,7 +214,7 @@
dbc_ssl="true"
fi
- cat << EOF > $dbc_packageconfig
+ cat << EOF > $tfile
# automatically generated by the maintainer scripts of $dbc_package
# any changes you make will be preserved, though your comments
# will be lost! to change your settings you should edit this
@@ -281,6 +283,8 @@
##
EOF
+ ucf "$tfile" "$dbc_packageconfig"
+ rm -f "$tfile"
if [ "$dbc_generate_include" ]; then
if echo $dbc_generate_include | grep -q -E "^[^:]*:"; then
iformat=`echo $dbc_generate_include | cut -d: -f1`