mirror of
				https://github.com/Telecominfraproject/ols-nos.git
				synced 2025-10-31 10:07:49 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			491 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			491 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| # Wait until redis starts
 | |
| until [[ $(sonic-db-cli PING | grep -c PONG) -gt 0 ]]; do
 | |
|   sleep 1;
 | |
| done
 | |
| 
 | |
| # If there is a config_db.json dump file, load it.
 | |
| if [ -r /etc/sonic/config_db.json ]; then
 | |
|     if [ -r /etc/sonic/init_cfg.json ]; then
 | |
|         sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
 | |
|     else
 | |
|         sonic-cfggen -j /etc/sonic/config_db.json --write-to-db
 | |
|     fi
 | |
| fi
 | |
| 
 | |
| sonic-db-cli CONFIG_DB SET "CONFIG_DB_INITIALIZED" "1"
 | 
