sonic-buildimage/files/dhcp/graphserviceurl
Taoyu Li a7ea0556c8 [updategraph]: Support a special value to use empty configuration (#1086)
When updategraph service is enabled, a special value 'default'
from DHCP response will now initialize the system with an empty
configuration instead of existing minigraph.

A DHCP response without option 224 will remain the current behavior
of skipping graph update and use existing default minigraph.
2017-10-27 18:01:02 -07:00

13 lines
339 B
Plaintext

case $reason in
BOUND|RENEW|REBIND|REBOOT)
if [ -n "$new_minigraph_url" ]; then
echo $new_minigraph_url > /tmp/dhcp_graph_url
else
echo "default" > /tmp/dhcp_graph_url
fi
if [ -n "$new_acl_url" ]; then
echo $new_acl_url > /tmp/dhcp_acl_url
fi
;;
esac