summaryrefslogtreecommitdiff
path: root/debian/mailgraph.postinst
diff options
context:
space:
mode:
authorJulien Valroff <julien@kirya.net>2010-09-04 15:03:32 +0200
committerJulien Valroff <julien@kirya.net>2010-09-04 15:03:32 +0200
commit614f647b71d2b2003e828c78f562ce7d13675b37 (patch)
tree9ccfea7d9483450e91fc383ff7ea8e72dd9a1949 /debian/mailgraph.postinst
parentd3d83113455f2bb70159191965b9858b58945a0d (diff)
Don't use any temporary file for ucf
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)