Commit 911f41e 1 parent e2ae581 commit 911f41e Copy full SHA for 911f41e
File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ if [[ $DATABASE_TYPE == "chassisdb" ]]; then
63
63
echo " Init docker-database-chassis..."
64
64
update_chassisdb_config -j $db_cfg_file_tmp -k -p $chassis_db_port
65
65
# generate all redis server supervisord configuration file
66
- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
67
- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/critical_processes.j2 > /etc/supervisor/critical_processes
66
+ sonic-cfggen -j $db_cfg_file_tmp \
67
+ -t /usr/share/sonic/templates/supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \
68
+ -t /usr/share/sonic/templates/critical_processes.j2,/etc/supervisor/critical_processes
68
69
rm $db_cfg_file_tmp
69
70
exec /usr/local/bin/supervisord
70
71
exit 0
81
82
fi
82
83
# delete chassisdb config to generate supervisord config
83
84
update_chassisdb_config -j $db_cfg_file_tmp -d
84
- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
85
- sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/critical_processes.j2 > /etc/supervisor/critical_processes
85
+ sonic-cfggen -j $db_cfg_file_tmp \
86
+ -t /usr/share/sonic/templates/supervisord.conf.j2,/etc/supervisor/conf.d/supervisord.conf \
87
+ -t /usr/share/sonic/templates/critical_processes.j2,/etc/supervisor/critical_processes
86
88
87
89
if [[ " $start_chassis_db " != " 1" ]] && [[ -z " $chassis_db_address " ]]; then
88
90
cp $db_cfg_file_tmp $db_cfg_file
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ CFGGEN_PARAMS=" \
23
23
-t /usr/share/sonic/templates/wait_for_link.sh.j2,/usr/bin/wait_for_link.sh \
24
24
"
25
25
VLAN=$( 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' `}
28
28
chmod +x /usr/bin/wait_for_link.sh
29
29
30
30
# Executed platform specific initialization tasks.
You can’t perform that action at this time.
0 commit comments