[Pkg-net-snmp-commits] [pkg-net-snmp] 04/12: fix bug#640456

Hideki Yamane henrich at moszumanska.debian.org
Sun Mar 30 10:01:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch master
in repository pkg-net-snmp.

commit c14d3923c6accaa2162cc021cfa93a238f870d2a
Author: Hideki Yamane <henrich at debian.org>
Date:   Sun Mar 30 18:33:13 2014 +0900

    fix bug#640456
---
 debian/changelog  |  4 ++++
 debian/snmpd.init | 10 ++++------
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ae2fc15..61a4a1c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,10 @@ net-snmp (5.7.2~dfsg-9) UNRELEASED; urgency=medium
     - check upstream PGP key
   * debian/rules
     - add etherlike-mib/dot3StatsTable (Closes: #729732, LP#1251847)
+  * debian/snmpd.init
+    - relax start-stop-daemons avoid restart daemon before it terminates.
+      Thanks to Saj Goonatilleke <saj.goonatilleke at anchor.net.au> for the
+      patch (Closes: #640456)
   * debian/snmpd.postinst
     - fix weird user creation (Closes: #482041, #589040, #606784, #610630)
   * debian/README.Debian
diff --git a/debian/snmpd.init b/debian/snmpd.init
index f2824fc..91de917 100644
--- a/debian/snmpd.init
+++ b/debian/snmpd.init
@@ -61,17 +61,15 @@ case "$1" in
     ;;
   stop)
     log_daemon_msg "Stopping SNMP services:"
-    start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/snmpd && [ ! -f $SNMP_PID ] || rm $SNMP_PID
+    start-stop-daemon --quiet --stop --oknodo --exec --retry 3 /usr/sbin/snmpd && [ ! -f $SNMP_PID ] || rm $SNMP_PID
     log_progress_msg " snmpd"
-    start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/snmptrapd && [ ! -f $TRAPD_PID ] || rm $TRAPD_PID
+    start-stop-daemon --quiet --stop --oknodo --exec --retry 3 /usr/sbin/snmptrapd && [ ! -f $TRAPD_PID ] || rm $TRAPD_PID
     log_progress_msg " snmptrapd"
     ;;
   restart)
     log_daemon_msg "Restarting SNMP services:"
-    start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/snmpd  && [ ! -f $SNMP_PID ] || rm $SNMP_PID
-    start-stop-daemon --quiet --stop --oknodo --exec /usr/sbin/snmptrapd  && [ ! -f $TRAPD_PID ] || rm $TRAPD_PID
-    # Allow the daemons time to exit completely.
-    sleep 2
+    start-stop-daemon --quiet --stop --oknodo --exec --retry 3 /usr/sbin/snmpd  && [ ! -f $SNMP_PID ] || rm $SNMP_PID
+    start-stop-daemon --quiet --stop --oknodo --exec --retry 3 /usr/sbin/snmptrapd  && [ ! -f $TRAPD_PID ] || rm $TRAPD_PID
     if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
 	start-stop-daemon --quiet --start --exec /usr/sbin/snmpd -- $SNMPDOPTS
 	log_progress_msg " snmpd"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git



More information about the Pkg-net-snmp-commits mailing list