2017-08-01 21:02:00 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Wait until redis starts
|
2018-01-18 21:55:11 -06:00
|
|
|
until [[ $(redis-cli ping | grep -c PONG) -gt 0 ]]; do
|
|
|
|
sleep 1;
|
2017-08-01 21:02:00 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
# If there is a config db dump file, load it
|
|
|
|
if [ -r /etc/sonic/config_db.json ]; then
|
|
|
|
sonic-cfggen -j /etc/sonic/config_db.json --write-to-db
|
|
|
|
fi
|
|
|
|
|
2020-01-22 13:26:23 -06:00
|
|
|
sonic-db-cli CONFIG_DB SET "CONFIG_DB_INITIALIZED" "1"
|