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
14 lines
412 B
Plaintext
14 lines
412 B
Plaintext
case $reason in
|
|
BOUND|RENEW|REBIND|REBOOT)
|
|
current_host_name=`hostname -s`
|
|
if [ "$current_host_name" != "$new_host_name" ] && [ -n "$new_host_name" ]
|
|
then
|
|
echo $new_host_name > /etc/hostname
|
|
hostname -F /etc/hostname
|
|
sed -i "/\s$current_host_name$/d" /etc/hosts
|
|
echo "127.0.0.1 $new_host_name" >> /etc/hosts
|
|
fi
|
|
;;
|
|
esac
|
|
|