sonic-buildimage/dockers/docker-snmp-sv2/start.sh
Tamer Ahmed 066a0b3b2b [snmp]: Reduce Calls to SONiC Cfggen (#5166)
Calls to sonic-cfggen is CPU expensive. This PR reduces calls to
sonic-cfggen to once calle during snmp startup

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2020-12-22 09:51:54 -08:00

17 lines
433 B
Bash
Executable File

#!/usr/bin/env bash
mkdir -p /etc/ssw /etc/snmp
SONIC_CFGGEN_ARGS=" \
-d \
-y /etc/sonic/sonic_version.yml \
-t /usr/share/sonic/templates/sysDescription.j2,/etc/ssw/sysDescription \
-y /etc/sonic/snmp.yml \
-t /usr/share/sonic/templates/snmpd.conf.j2,/etc/snmp/snmpd.conf \
"
sonic-cfggen $SONIC_CFGGEN_ARGS
mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status