summaryrefslogtreecommitdiff
path: root/debian/mailgraph.postinst
diff options
context:
space:
mode:
authorJulien Valroff <julien@kirya.net>2010-09-04 14:15:48 +0200
committerJulien Valroff <julien@kirya.net>2010-09-04 14:15:48 +0200
commit0672a9a0be1ff5351b9ed64104c737488c093def (patch)
tree0b56680d02d36e1e4d632478a86229d1e76a5d2a /debian/mailgraph.postinst
parentc5740eb67fa4fbb23f2a3daf38832f3348f7de63 (diff)
Fixes for previous commit
Diffstat (limited to 'debian/mailgraph.postinst')
-rw-r--r--debian/mailgraph.postinst16
1 files changed, 6 insertions, 10 deletions
diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst
index 2464098..2bfa4db 100644
--- a/debian/mailgraph.postinst
+++ b/debian/mailgraph.postinst
@@ -21,22 +21,18 @@ set -e
case "$1" in
configure)
- db_get mailgraph/start_on_boot || true
- BOOT_START=$RET
-
- db_get mailgraph/mail_log || true
- MAIL_LOG=$RET
-
- db_get mailgraph/ignore_localhost
- IGNORE_LOCALHOST=$RET
-
TEMPFILE=`tempfile`
cp -p /usr/share/mailgraph/mailgraph.default ${TEMPFILE}
+ # Merge debconf values into the configuration
+ for i in BOOT_START=start_on_boot MAIL_LOG=mail_log IGNORE_LOCALHOST=ignore_localhost; do
+ db_get rkhunter/${i%=*}
+ sed -i -re "s@^(${i#*=}=).*@\1\"${RET}\"@" "$TEMPFILE"
+ done
+
ucf --three-way --debconf-ok ${TEMPFILE} /etc/default/mailgraph
ucfr mailgraph /etc/default/mailgraph
rm -f ${TEMPFILE}
-
;;
abort-upgrade|abort-remove|abort-deconfigure)