From 614f647b71d2b2003e828c78f562ce7d13675b37 Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Sat, 4 Sep 2010 15:03:32 +0200 Subject: Don't use any temporary file for ucf --- debian/mailgraph.postinst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'debian/mailgraph.postinst') 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) -- cgit v1.2.3