summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Randle <bill.randle@gmail.com>2017-09-24 10:31:31 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-10-11 16:22:49 -0400
commitba0e19ad5b2f97072b7eb465be3ac5d29e8751f4 (patch)
treea32c8bc946468e113fc434a791ccba9022e5dc26
parente72b72c5b0b66d3368195d2534a32e75bc7c6fad (diff)
downloadmeta-openembedded-ba0e19ad5b2f97072b7eb465be3ac5d29e8751f4.tar.gz
net-snmp: check that executable is used before testing for existance
The recipe for net-snmp has snmpd and snmptrapd in seperate packages, so one or the other or both could be installed. In a common case where only snmpd is installed, the startup script will fail to run because the snmptrapd executable does not exist. This patch simply qualifies the test by first checking to see if the executable is to be used. -Bill Signed-off-by: Bill Randle <bill.randle@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rwxr-xr-xmeta-networking/recipes-protocols/net-snmp/files/init6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/files/init b/meta-networking/recipes-protocols/net-snmp/files/init
index 2b8fe18b3..47995466f 100755
--- a/meta-networking/recipes-protocols/net-snmp/files/init
+++ b/meta-networking/recipes-protocols/net-snmp/files/init
@@ -3,9 +3,6 @@
3 3
4. /etc/init.d/functions 4. /etc/init.d/functions
5 5
6test -x /usr/sbin/snmpd || exit 0
7test -x /usr/sbin/snmptrapd || exit 0
8
9# Defaults 6# Defaults
10export MIBDIRS=/usr/share/snmp/mibs 7export MIBDIRS=/usr/share/snmp/mibs
11SNMPDRUN=yes 8SNMPDRUN=yes
@@ -18,6 +15,9 @@ SPIDFILE=/var/run/snmptrapd.pid
18# Reads config file if exists (will override defaults above) 15# Reads config file if exists (will override defaults above)
19[ -r /etc/default/snmpd ] && . /etc/default/snmpd 16[ -r /etc/default/snmpd ] && . /etc/default/snmpd
20 17
18[ "$SNMPDRUN" = "yes" ] && { test -x /usr/sbin/snmpd || exit 0; }
19[ "$TRAPDRUN" = "yes" ] && { test -x /usr/sbin/snmptrapd || exit 0; }
20
21case "$1" in 21case "$1" in
22 start) 22 start)
23 echo -n "Starting network management services:" 23 echo -n "Starting network management services:"