All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] netsnmp: fix stop and restart actions in init script
@ 2011-06-15 15:47 Luca Ceresoli
  2011-06-15 15:47 ` [Buildroot] [PATCH 2/2] netsnmp: allow not to install MIB files Luca Ceresoli
  2011-06-16 15:27 ` [Buildroot] [PATCH v2 0/3] netsnmp improvements Luca Ceresoli
  0 siblings, 2 replies; 15+ messages in thread
From: Luca Ceresoli @ 2011-06-15 15:47 UTC (permalink / raw)
  To: buildroot

/etc/init.d/S59snmpd stop (and restart) currently fail if either snmpd or
snmptrapd are not running.
This is because start-stop-daemon -K returns nonzero if the process to be
killed is not running, and this causes the whole script to fail because it runs
under 'set -e'.

This may not be noticed if only the last start-stop-daemon fails, but this is
in general wrong. It would also cause a failure in other scripts that execute
S59snmpd and check the return value.

Adding the --oknodo (-o) option to start-stop-daemon fixes this.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
Weird enough, in the current code the ssd_oknodo variable is first set, then
cleared. git log does not help to understand why, but this looks really
useless.

This is why I removed a line, instead of adding one.

 package/netsnmp/S59snmpd |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/package/netsnmp/S59snmpd b/package/netsnmp/S59snmpd
index f65317a..5df4b85 100755
--- a/package/netsnmp/S59snmpd
+++ b/package/netsnmp/S59snmpd
@@ -29,7 +29,6 @@ TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
 [ -r /etc/default/snmpd ] && . /etc/default/snmpd
 
 ssd_oknodo="-o"
-ssd_oknodo=""
 
 # Cd to / before starting any daemons.
 cd /
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-09-11 21:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 15:47 [Buildroot] [PATCH 1/2] netsnmp: fix stop and restart actions in init script Luca Ceresoli
2011-06-15 15:47 ` [Buildroot] [PATCH 2/2] netsnmp: allow not to install MIB files Luca Ceresoli
2011-06-16 15:27 ` [Buildroot] [PATCH v2 0/3] netsnmp improvements Luca Ceresoli
2011-06-16 15:27   ` [Buildroot] [PATCH v2 1/3] netsnmp: fix stop and restart actions in init script Luca Ceresoli
2011-06-16 15:27   ` [Buildroot] [PATCH v2 2/3] netsnmp: allow to disable MIB loading code Luca Ceresoli
2011-06-16 15:27   ` [Buildroot] [PATCH v2 3/3] netsnmp: allow not to install MIB files Luca Ceresoli
2011-08-30 17:50     ` Yann E. MORIN
2011-08-31 12:48       ` Luca Ceresoli
2011-08-31 13:33         ` Yann E. MORIN
2011-08-30 17:39   ` [Buildroot] [PATCH v2 0/3] netsnmp improvements Gustavo Zacarias
2011-08-31 19:46   ` [Buildroot] [PATCH v3 1/2] netsnmp: fix stop and restart actions in init script Luca Ceresoli
2011-08-31 19:46     ` [Buildroot] [PATCH v3 2/2] netsnmp: allow to disable MIB files installation and MIB loading code Luca Ceresoli
2011-08-31 20:38       ` Yann E. MORIN
2011-09-11 21:10       ` Peter Korsgaard
2011-09-11 21:09     ` [Buildroot] [PATCH v3 1/2] netsnmp: fix stop and restart actions in init script Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.