summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Valroff <julien@kirya.net>2010-09-04 14:07:55 +0200
committerJulien Valroff <julien@kirya.net>2010-09-04 14:07:55 +0200
commitc5740eb67fa4fbb23f2a3daf38832f3348f7de63 (patch)
tree77115019e8b3881899f840897f47b7bd5f08d236
parentfd8f9a9aac032539390bf22d063bcb68d32390f0 (diff)
ship a default file in the package
-rw-r--r--debian/changelog2
-rw-r--r--debian/mailgraph.default24
-rw-r--r--debian/mailgraph.install5
-rw-r--r--debian/mailgraph.postinst33
4 files changed, 33 insertions, 31 deletions
diff --git a/debian/changelog b/debian/changelog
index cc82c0e..0005dfc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,7 +5,7 @@ mailgraph (1.14-4) unstable; urgency=low
* Update debconf templates translations:
+ de - thanks to Martin Eberhard Schauer (Closes: #593570)
+ it - thanks to Luca Monducci (Closes: #593719)
- * Add versionned pre-dependency on debconf
+ * Add versioned pre-dependency on debconf
* Use ucf to deal with conffile (thanks to Matthijs Möhlmann)
-- Julien Valroff <julien@kirya.net> Sun, 29 Aug 2010 18:29:55 +0200
diff --git a/debian/mailgraph.default b/debian/mailgraph.default
new file mode 100644
index 0000000..12f380a
--- /dev/null
+++ b/debian/mailgraph.default
@@ -0,0 +1,24 @@
+# This file is sourced by /etc/init.d/mailgraph
+#
+# This is a POSIX shell fragment
+#
+
+# Should Mailgraph start on boot (true|false) (default: true)
+BOOT_START=$BOOT_START
+
+# Logfile used by mailgraph (default: /var/log/mail.log)
+MAIL_LOG=$MAIL_LOG
+
+# Ignore mails from localhost (true|false) (default: false)
+# When true, this will pass --ignore-localhost to mailgraph daemon
+IGNORE_LOCALHOST=$IGNORE_LOCALHOST
+
+# Extra options to be passed to mailgraph daemon
+# See mailgraph -h output (default: "")
+EXTRA_OPTIONS=""
+
+# User and group http daemon runs as (default: www-data for both options)
+# Restart mailgraph daemon so that these values are taken into account
+HTTP_USER=www-data
+HTTP_GROUP=www-data
+
diff --git a/debian/mailgraph.install b/debian/mailgraph.install
index 14f1685..c8632c1 100644
--- a/debian/mailgraph.install
+++ b/debian/mailgraph.install
@@ -1,2 +1,3 @@
-mailgraph usr/sbin
-mailgraph.cgi usr/lib/cgi-bin
+mailgraph usr/sbin
+mailgraph.cgi usr/lib/cgi-bin
+debian/mailgraph.default usr/share/mailgraph
diff --git a/debian/mailgraph.postinst b/debian/mailgraph.postinst
index 31088e0..2464098 100644
--- a/debian/mailgraph.postinst
+++ b/debian/mailgraph.postinst
@@ -30,35 +30,12 @@ case "$1" in
db_get mailgraph/ignore_localhost
IGNORE_LOCALHOST=$RET
- TEMPFILE=`tempfile -m 644`
- cat << EOF > $TEMPFILE
-# This file is sourced by /etc/init.d/mailgraph
-#
-# This is a POSIX shell fragment
-#
-
-# Should Mailgraph start on boot (true|false) (default: true)
-BOOT_START=$BOOT_START
-
-# Logfile used by mailgraph (default: /var/log/mail.log)
-MAIL_LOG=$MAIL_LOG
-
-# Ignore mails from localhost (true|false) (default: false)
-# When true, this will pass --ignore-localhost to mailgraph daemon
-IGNORE_LOCALHOST=$IGNORE_LOCALHOST
-
-# Extra options to be passed to mailgraph daemon
-# See mailgraph -h output (default: "")
-EXTRA_OPTIONS=""
-
-# User and group http daemon runs as (default: www-data for both options)
-# Restart mailgraph daemon so that these values are taken into account
-HTTP_USER=www-data
-HTTP_GROUP=www-data
-EOF
+ TEMPFILE=`tempfile`
+ cp -p /usr/share/mailgraph/mailgraph.default ${TEMPFILE}
- ucf $TEMPFILE /etc/default/mailgraph --debconf-ok
- rm -f $TEMPFILE
+ ucf --three-way --debconf-ok ${TEMPFILE} /etc/default/mailgraph
+ ucfr mailgraph /etc/default/mailgraph
+ rm -f ${TEMPFILE}
;;