Update buidlroot to version 2016.08.1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#! /bin/sh -e
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: snmpd snmptrapd
|
||||
# Required-Start: $network $local_fs
|
||||
@@ -11,7 +11,6 @@
|
||||
#
|
||||
# Author: Jochen Friedrich <jochen@scram.de>
|
||||
#
|
||||
set -e
|
||||
|
||||
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
@@ -38,56 +37,71 @@ if [ "$SNMPDCOMPAT" = "yes" ]; then
|
||||
ln -sf /var/agentx/master /var/run/agentx
|
||||
fi
|
||||
|
||||
start() {
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
printf "Starting SNMP daemon: "
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
printf "Starting SNMP trap daemon: "
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
printf "Stopping SNMP daemon: "
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
printf "Stopping SNMP trap daemon: "
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
reload() {
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
printf "Reloading SNMP daemon: "
|
||||
start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
printf "Reloading SNMP trap daemon: "
|
||||
start-stop-daemon -q -K -s 1 -p /var/run/snmptrapd.pid -x /usr/sbin/snmptrapd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting network management services:"
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
|
||||
printf " snmpd"
|
||||
fi
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
|
||||
printf " snmptrapd"
|
||||
fi
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping network management services:"
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
|
||||
printf " snmpd"
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
|
||||
printf " snmptrapd"
|
||||
echo "."
|
||||
;;
|
||||
restart)
|
||||
printf "Restarting network management services:"
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
|
||||
# Allow the daemons time to exit completely.
|
||||
sleep 2
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
|
||||
printf " snmpd"
|
||||
fi
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
# Allow snmpd time to start up.
|
||||
sleep 1
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
|
||||
printf " snmptrapd"
|
||||
fi
|
||||
echo "."
|
||||
;;
|
||||
reload|force-reload)
|
||||
printf "Reloading network management services:"
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
|
||||
printf " snmpd"
|
||||
fi
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/snmpd {start|stop|restart|reload|force-reload}"
|
||||
exit 1
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
# Allow the daemons time to exit completely.
|
||||
sleep 2
|
||||
start
|
||||
;;
|
||||
|
||||
reload|force-reload)
|
||||
reload
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -67,6 +67,11 @@ ifeq ($(BR2_PACKAGE_PCIUTILS),y)
|
||||
NETSNMP_DEPENDENCIES += pciutils
|
||||
endif
|
||||
|
||||
# For ucd-snmp/lmsensorsMib
|
||||
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
|
||||
NETSNMP_DEPENDENCIES += lm-sensors
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y)
|
||||
NETSNMP_CONF_OPTS += --disable-mib-loading
|
||||
NETSNMP_CONF_OPTS += --disable-mibs
|
||||
|
||||
Reference in New Issue
Block a user