sonic-buildimage/dockers/docker-snmp/start.sh
SuvarnaMeenakshi 2579b9506c
[202305][SNMP][IPv6]: Revert PRs to support SNMP over IPv6 (#16649)
* Revert "[SNMP][IPv6]: Fix to use link local IPv6 address as snmp agentAddress (#16013)"

This reverts commit ebe8c8c223.

* Revert "[SNMP][IPv6]: Fix SNMP IPv6 reachability issue in certain scenarios (#15487) (#15874)"

This reverts commit 83aa8b8180.
2023-10-09 09:47:44 +08:00

30 lines
715 B
Bash
Executable File

#!/usr/bin/env bash
if [ "${RUNTIME_OWNER}" == "" ]; then
RUNTIME_OWNER="kube"
fi
CTR_SCRIPT="/usr/share/sonic/scripts/container_startup.py"
if test -f ${CTR_SCRIPT}
then
${CTR_SCRIPT} -f snmp -o ${RUNTIME_OWNER} -v ${IMAGE_VERSION}
fi
mkdir -p /etc/ssw /etc/snmp
# Parse snmp.yml and insert the data in Config DB
/usr/bin/snmp_yml_to_configdb.py
SONIC_CFGGEN_ARGS=" \
-d \
-y /etc/sonic/sonic_version.yml \
-t /usr/share/sonic/templates/sysDescription.j2,/etc/ssw/sysDescription \
-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