diff options
| -rw-r--r-- | debian/mailgraph.config | 7 | ||||
| -rw-r--r-- | debian/mailgraph.postinst | 10 | 
2 files changed, 8 insertions, 9 deletions
diff --git a/debian/mailgraph.config b/debian/mailgraph.config index 81a5977..84c101a 100644 --- a/debian/mailgraph.config +++ b/debian/mailgraph.config @@ -6,6 +6,7 @@ set -e  db_title "mailgraph" || true +# Sync debconf values with the local configuration  if [ -r /etc/default/mailgraph ]; then  	. /etc/default/mailgraph  	db_set mailgraph/start_on_boot "$BOOT_START" @@ -14,8 +15,8 @@ if [ -r /etc/default/mailgraph ]; then  fi  db_input medium mailgraph/start_on_boot || true -db_go +db_go || true  db_input medium mailgraph/mail_log || true -db_go +db_go || true  db_input medium mailgraph/ignore_localhost || true -db_go +db_go || true 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)  | 
