summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2014-06-26 19:07:03 +0200
committerAxel Beckert <abe@deuxchevaux.org>2014-06-26 19:07:03 +0200
commit0f28b7d153ea42de08054f542e81deb4c04631e6 (patch)
tree5fcf96a74dbace04776f5bd3a292a030523b575c
parent5ad7457144a53148ddeb2bf5d89588252bd2de3a (diff)
Prepare NMU to fix #670681. Also seems to fix #630353.
-rw-r--r--debian/changelog9
-rw-r--r--debian/postgrey.init6
-rw-r--r--debian/postgrey.preinst12
3 files changed, 24 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index bd5c23f..9be92ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+postgrey (1.34-1.3) unstable; urgency=high
+
+ * Non-maintainer upload in accordance with maintainer.
+ * Fix "stop" action of init script. (Closes: #670681, #630353)
+ + Add preinst script which kills postgrey daemons neither stoppable by
+ the old nor by the new init.d script.
+
+ -- Axel Beckert <abe@debian.org> Thu, 26 Jun 2014 16:03:15 +0200
+
postgrey (1.34-1.2) unstable; urgency=high
* Non-maintainer upload.
diff --git a/debian/postgrey.init b/debian/postgrey.init
index 7aeab33..0cb916b 100644
--- a/debian/postgrey.init
+++ b/debian/postgrey.init
@@ -51,7 +51,7 @@ case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
if start-stop-daemon --start --oknodo --quiet \
- --pidfile $PIDFILE --name $NAME \
+ --pidfile $PIDFILE \
--startas $DAEMON -- $POSTGREY_OPTS "$POSTGREY_TEXT_OPT"
then
log_end_msg 0
@@ -63,7 +63,7 @@ case "$1" in
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
if start-stop-daemon --stop --oknodo --quiet \
- --pidfile $PIDFILE --name $NAME
+ --pidfile $PIDFILE
then
log_end_msg 0
else
@@ -75,7 +75,7 @@ case "$1" in
reload|force-reload)
log_action_begin_msg "Reloading $DESC configuration..."
if start-stop-daemon --stop --signal 1 --quiet \
- --pidfile $PIDFILE --name $NAME
+ --pidfile $PIDFILE
then
log_action_end_msg 0
else
diff --git a/debian/postgrey.preinst b/debian/postgrey.preinst
new file mode 100644
index 0000000..4b71db1
--- /dev/null
+++ b/debian/postgrey.preinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# preinst script to kill postgrey daemons started by broken init.d
+# script. See https://bugs.debian.org/670681 for details.
+
+set -e
+
+if [ "$1" != "abort-upgrade" ] && dpkg --compare-versions "$2" lt-nl "1.34-1.3~"; then
+ start-stop-daemon --stop --oknodo --user postgrey
+fi
+
+#DEBHELPER#