ea372cc7c1
- Add a functionality to get SNMP community from DHCP (option 224) - Add a functionality to get minigraph from http service instead of using default minigraph - The url for graph service is passed through DHCP option 225 - This feature is by default disabled. Modify rule/config to enable it on build time, or modify /etc/sonic/graph_service_url on run time. - Fix a bug that getting hostname from DHCP is not working correctly
12 lines
393 B
Plaintext
12 lines
393 B
Plaintext
case $reason in
|
|
BOUND|RENEW|REBIND|REBOOT)
|
|
if [ -n "${new_snmp_community}" ]; then
|
|
if [ -f /etc/sonic/snmp.yml ]; then
|
|
sed -i "s/^snmp_rocommunity:.*/snmp_rocommunity: $new_snmp_community/g" /etc/sonic/snmp.yml
|
|
else
|
|
echo "snmp_rocommunity: "$new_snmp_community > /etc/sonic/snmp.yml
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|