summaryrefslogtreecommitdiff
path: root/debian/mailgraph.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/mailgraph.postinst')
-rw-r--r--debian/mailgraph.postinst10
1 files changed, 4 insertions, 6 deletions
diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst
index 2cbe1bd..fa10193 100644
--- a/debian/mailgraph.postinst
+++ b/debian/mailgraph.postinst
@@ -19,20 +19,18 @@ set -e
. /usr/share/debconf/confmodule
+DEFAULT="/usr/share/mailgraph/mailgraph.default"
+
case "$1" in
configure)
- TEMPFILE=`tempfile`
- cp -p /usr/share/mailgraph/mailgraph.default ${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}\"@" "$TEMPFILE"
+ sed -i -re "s@^(${foo%=*}=).*@\1\"${RET}\"@" "$DEFAULT"
done
- ucf --three-way --debconf-ok ${TEMPFILE} /etc/default/mailgraph
+ ucf --three-way --debconf-ok ${DEFAULT} /etc/default/mailgraph
ucfr mailgraph /etc/default/mailgraph
- rm -f ${TEMPFILE}
;;
abort-upgrade|abort-remove|abort-deconfigure)