From 16da8ccce50519ad09acea33852fd82196ef5850 Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Sat, 4 Sep 2010 15:25:07 +0200 Subject: Re-add temporary file for ucf --- debian/mailgraph.postinst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst index e580d00..e52d51c 100644 --- a/debian/mailgraph.postinst +++ b/debian/mailgraph.postinst @@ -23,14 +23,19 @@ DEFAULT="/usr/share/mailgraph/default.conf" case "$1" in configure) + + $tempfile=`mktemp` + cp -p /usr/share/mailgraph/default.conf ${tempfile} + # Merge debconf values into the configuration for foo in BOOT_START=start_on_boot MAIL_LOG=mail_log IGNORE_LOCALHOST=ignore_localhost; do db_get mailgraph/${foo#*=} - sed -i -re "s@^(${foo%=*}=).*@\1\"${RET}\"@" "$DEFAULT" + sed -i -re "s@^(${foo%=*}=).*@\1\"${RET}\"@" "$tempfile" done - ucf --three-way --debconf-ok ${DEFAULT} /etc/default/mailgraph + ucf --three-way --debconf-ok ${tempfile} /etc/default/mailgraph ucfr mailgraph /etc/default/mailgraph + rm -f ${tempfile} ;; abort-upgrade|abort-remove|abort-deconfigure) -- cgit v1.2.3