We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67f9f96 commit c67fe24Copy full SHA for c67fe24
config/main.py
@@ -165,7 +165,10 @@ def load_minigraph():
165
config_db.connect()
166
client = config_db.redis_clients[config_db.CONFIG_DB]
167
client.flushdb()
168
- command = "{} -m --write-to-db".format(SONIC_CFGGEN_PATH)
+ if os.path.isfile('/etc/sonic/init_cfg.json'):
169
+ command = "{} -m -j /etc/sonic/init_cfg.json --write-to-db".format(SONIC_CFGGEN_PATH)
170
+ else:
171
+ command = "{} -m --write-to-db".format(SONIC_CFGGEN_PATH)
172
run_command(command, display_cmd=True)
173
client.set(config_db.INIT_INDICATOR, True)
174
command = "{} -m -v \"DEVICE_METADATA['localhost']['hostname']\"".format(SONIC_CFGGEN_PATH)
0 commit comments