summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)