Skip to content

Commit

Permalink
Fix a bug that default graph might be missing when generating minimal…
Browse files Browse the repository at this point in the history
… config (#1747)
  • Loading branch information
taoyl-ms authored May 29, 2018
1 parent a917517 commit 225b3e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/image_config/updategraph/updategraph
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ if [ "$src" = "dhcp" ]; then
fi
if [ "`cat /tmp/dhcp_graph_url`" = "N/A" ]; then
echo "'N/A' found in DHCP response. Skipping graph update and generating an empty configuration."
if [ ! -f /etc/sonic/minigraph.xml ]; then
copy_default_minigraph
fi
echo '{"DEVICE_METADATA":' > /tmp/device_meta.json
sonic-cfggen -H -m /etc/sonic/minigraph.xml --var-json DEVICE_METADATA >> /tmp/device_meta.json
echo '}' >> /tmp/device_meta.json
Expand Down

0 comments on commit 225b3e5

Please sign in to comment.