diff options
author | Hideki Yamane <henrich@debian.org> | 2014-03-30 18:33:13 +0900 |
---|---|---|
committer | Hideki Yamane <henrich@debian.org> | 2014-03-30 18:34:06 +0900 |
commit | c14d3923c6accaa2162cc021cfa93a238f870d2a (patch) | |
tree | a08422154b227d7d92234067ab2798b63d1dd51c | |
parent | 48500ddd95c556613aa16e846c933b385aaff279 (diff) | |
download | pkg-net-snmp-c14d3923c6accaa2162cc021cfa93a238f870d2a.tar.gz |
fix bug#640456
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | 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@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" |