diff options
Diffstat (limited to 'debian/mailgraph.postinst')
-rw-r--r-- | debian/mailgraph.postinst | 25 |
1 files changed, 16 insertions, 9 deletions
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 ;; |