Fix a bug that default graph might be missing when generating minimal config (#1747)
This commit is contained in:
parent
a917517f60
commit
225b3e5b91
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user