summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJulien Valroff <julien@kirya.net>2010-09-04 15:25:07 +0200
committerJulien Valroff <julien@kirya.net>2010-09-04 15:25:07 +0200
commit16da8ccce50519ad09acea33852fd82196ef5850 (patch)
treeedbc540e44ca25e77edcd4f6af1d718782322c4e /debian
parent20b106de4992c14d499b2aa722c220de11003470 (diff)
Re-add temporary file for ucf
Diffstat (limited to 'debian')
-rw-r--r--debian/mailgraph.postinst9
1 files 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)