b6efe438b5
* [cfggen] Support reading from and writing to configdb * [bgp] Move bgp_admin_state to configdb, support dynamic admin state change * [sonic-utilities] Adapt configDB for admin status, support config save and config load
18 lines
361 B
Bash
Executable File
18 lines
361 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Wait until redis starts
|
|
while true; do
|
|
if [ `redis-cli ping` == "PONG" ]; then
|
|
break
|
|
fi
|
|
sleep 1
|
|
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
|
|
|
|
echo -en "SELECT 4\nSET CONFIG_DB_INITIALIZED true" | redis-cli
|
|
|