Commit fdee6c9f authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

delay snmpd at startup to avoid spurious errors reported to syslog

parent 8c79c6a0
......@@ -3,10 +3,10 @@
SNMP_PID=/var/run/snmpd.pid
SNMP_CONF=/etc/snmpd.conf
dotconfig=/wr/etc/dot-config
COUNTER_FILE="/tmp/start_cnt_snmpd"
start_counter() {
# increase boot counter
COUNTER_FILE="/tmp/start_cnt_snmpd"
START_COUNTER=1
if [ -f "$COUNTER_FILE" ];
then
......@@ -37,6 +37,14 @@ start() {
LOG="-L$WRS_LOG"
fi
if [ ! -f "$COUNTER_FILE" ];
then
# file doesn't exist yet so it's a boot call, delay to avoid spurious
# errors
echo "Delaying the start of snmp daemon"
sleep 60
fi
# Log source address (-a)
start-stop-daemon -q -p $SNMP_PID -S \
--exec /usr/sbin/snmpd -- $LOG -p $SNMP_PID -a -c $SNMP_CONF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment