File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ if [[ $DATABASE_TYPE == "chassisdb" ]]; then
5151 echo " Init docker-database-chassis..."
5252 update_chassisdb_config -j $db_cfg_file_tmp -k -p $chassis_db_port
5353 # generate all redis server supervisord configuration file
54- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
55- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/critical_processes.j2 > /etc/supervisor/critical_processes
54+ sonic-cfggen -j $db_cfg_file_tmp \
55+ -t /usr/share/sonic/templates/supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \
56+ -t /usr/share/sonic/templates/critical_processes.j2,/etc/supervisor/critical_processes
5657 rm $db_cfg_file_tmp
5758 exec /usr/local/bin/supervisord
5859 exit 0
6970fi
7071# delete chassisdb config to generate supervisord config
7172update_chassisdb_config -j $db_cfg_file_tmp -d
72- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
73- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/critical_processes.j2 > /etc/supervisor/critical_processes
73+ sonic-cfggen -j $db_cfg_file_tmp \
74+ -t /usr/share/sonic/templates/supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \
75+ -t /usr/share/sonic/templates/critical_processes.j2,/etc/supervisor/critical_processes
7476
7577if [[ " $start_chassis_db " != " 1" ]] && [[ -z " $chassis_db_address " ]]; then
7678 cp $db_cfg_file_tmp $db_cfg_file
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ CFGGEN_PARAMS=" \
2323 -t /usr/share/sonic/templates/wait_for_link.sh.j2,/usr/bin/wait_for_link.sh \
2424"
2525VLAN=$( sonic-cfggen $CFGGEN_PARAMS )
26- SUBTYPE=$( sonic-cfggen -d -v " DEVICE_METADATA[' localhost'][ 'subtype'] " )
27- SWITCH_TYPE=${SWITCH_TYPE:- `sonic-cfggen -d -v " DEVICE_METADATA[' localhost'][ 'switch_type'] " `}
26+ SUBTYPE=$( sonic-db-cli -s CONFIG_DB HGET ' DEVICE_METADATA| localhost' ' subtype' )
27+ SWITCH_TYPE=${SWITCH_TYPE:- `sonic-db-cli -s CONFIG_DB HGET ' DEVICE_METADATA| localhost' ' switch_type' `}
2828chmod +x /usr/bin/wait_for_link.sh
2929
3030# Executed platform specific initialization tasks.
You can’t perform that action at this time.
0 commit comments