This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/files/scripts/configdb-load.sh
Dong Zhang 0dae59ac30 [MultiDB]except src and dockers : replace redis-cli with sonic-db-cli and use new DBConnector (#3928)
* [MultiDB]except src and dockers : replace redis-cli with sonic-db-cli and use new DBConnector
* fix vs tests along with swss vs tests together
2020-01-02 14:46:25 -08:00

14 lines
325 B
Bash
Executable File

#!/usr/bin/env bash
# Wait until redis starts
until [[ $(redis-cli ping | grep -c PONG) -gt 0 ]]; do
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
sonic-db-cli CONFIG_DB SET "CONFIG_DB_INITIALIZED" "1"