From 999ee603379f337cb3282b05517648eda1dbf1b7 Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Sun, 29 Aug 2010 18:30:34 +0200 Subject: Use ucf for conffile --- debian/mailgraph.postinst | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'debian/mailgraph.postinst') diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst index 4dea08d..3af0c30 100644 --- a/debian/mailgraph.postinst +++ b/debian/mailgraph.postinst @@ -32,15 +32,22 @@ case "$1" in db_get mailgraph/ignore_localhost IGNORE_LOCALHOST=$RET - if [ -w $DF ]; then - TEMPFILE=`mktemp` || exit 1 - sed $DF -e "s,^ *BOOT_START=.*,BOOT_START=$BOOT_START," \ - -e "s,^ *MAIL_LOG=.*,MAIL_LOG=$MAIL_LOG," \ - -e "s,^ *IGNORE_LOCALHOST=.*,IGNORE_LOCALHOST=$IGNORE_LOCALHOST," \ - > $TEMPFILE - mv -f $TEMPFILE $DF - chmod 644 $DF - fi + db_stop + + TEMPFILE=`mktemp` + cat << _eof > $TEMPFILE + # Should Mailgraph start on boot + BOOT_START=$BOOT_START + + # Logfile used by mailgraph + MAIL_LOG=$MAIL_LOG + + # Ignore mail to/from localhost + IGNORE_LOCALHOST=$IGNORE_LOCALHOST + _eof + + ucf $TEMPFILE /etc/default/mailgraph + rm -f $TEMPFILE ;; -- cgit v1.2.3