2017-11-30 16:59:25 -06:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
# generate configuration
|
|
|
|
|
2018-11-21 00:32:40 -06:00
|
|
|
PLATFORM=x86_64-kvm_x86_64-r0
|
|
|
|
HWSKU=Force10-S6000
|
|
|
|
|
|
|
|
ln -sf /usr/share/sonic/device/$PLATFORM/$HWSKU /usr/share/sonic/hwsku
|
|
|
|
|
2017-11-30 16:59:25 -06:00
|
|
|
[ -d /etc/sonic ] || mkdir -p /etc/sonic
|
|
|
|
|
|
|
|
SYSTEM_MAC_ADDRESS=$(ip link show eth0 | grep ether | awk '{print $2}')
|
|
|
|
sonic-cfggen -a '{"DEVICE_METADATA":{"localhost": {"mac": "'$SYSTEM_MAC_ADDRESS'"}}}' --print-data > /etc/sonic/init_cfg.json
|
|
|
|
|
|
|
|
if [ -f /etc/sonic/config_db.json ]; then
|
2020-03-05 17:35:35 -06:00
|
|
|
sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --print-data > /tmp/config_db.json
|
2017-11-30 16:59:25 -06:00
|
|
|
mv /tmp/config_db.json /etc/sonic/config_db.json
|
|
|
|
else
|
2018-01-29 10:11:05 -06:00
|
|
|
# generate and merge buffers configuration into config file
|
2018-11-21 00:32:40 -06:00
|
|
|
sonic-cfggen -t /usr/share/sonic/hwsku/buffers.json.j2 > /tmp/buffers.json
|
2019-09-13 13:28:25 -05:00
|
|
|
sonic-cfggen -j /etc/sonic/init_cfg.json -t /usr/share/sonic/hwsku/qos.json.j2 > /tmp/qos.json
|
2018-11-21 00:32:40 -06:00
|
|
|
sonic-cfggen -p /usr/share/sonic/hwsku/port_config.ini -k $HWSKU --print-data > /tmp/ports.json
|
2019-02-01 13:18:02 -06:00
|
|
|
sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json -j /tmp/qos.json -j /tmp/ports.json --print-data > /etc/sonic/config_db.json
|
2017-11-30 16:59:25 -06:00
|
|
|
fi
|
2017-10-24 00:01:42 -05:00
|
|
|
|
|
|
|
mkdir -p /etc/swss/config.d/
|
|
|
|
|
|
|
|
rm -f /var/run/rsyslogd.pid
|
|
|
|
|
|
|
|
supervisorctl start rsyslogd
|
|
|
|
|
2019-11-20 12:40:19 -06:00
|
|
|
mkdir -p /var/run/redis/sonic-db
|
|
|
|
cp /etc/default/sonic-db/database_config.json /var/run/redis/sonic-db/
|
2017-10-24 00:01:42 -05:00
|
|
|
|
|
|
|
supervisorctl start redis-server
|
|
|
|
|
2017-11-30 16:59:25 -06:00
|
|
|
/usr/bin/configdb-load.sh
|
|
|
|
|
2017-10-24 00:01:42 -05:00
|
|
|
supervisorctl start syncd
|
|
|
|
|
|
|
|
supervisorctl start orchagent
|
|
|
|
|
|
|
|
supervisorctl start portsyncd
|
|
|
|
|
|
|
|
supervisorctl start neighsyncd
|
|
|
|
|
2017-11-03 19:13:39 -05:00
|
|
|
supervisorctl start teamsyncd
|
|
|
|
|
2017-11-13 16:38:07 -06:00
|
|
|
supervisorctl start fpmsyncd
|
|
|
|
|
2018-10-19 05:41:53 -05:00
|
|
|
supervisorctl start teammgrd
|
|
|
|
|
2019-02-01 01:28:31 -06:00
|
|
|
supervisorctl start vrfmgrd
|
|
|
|
|
2018-08-20 13:19:16 -05:00
|
|
|
supervisorctl start portmgrd
|
|
|
|
|
2017-11-30 16:59:25 -06:00
|
|
|
supervisorctl start intfmgrd
|
|
|
|
|
|
|
|
supervisorctl start vlanmgrd
|
|
|
|
|
|
|
|
supervisorctl start zebra
|
|
|
|
|
2019-05-29 18:14:48 -05:00
|
|
|
supervisorctl start staticd
|
|
|
|
|
2018-01-29 10:11:05 -06:00
|
|
|
supervisorctl start buffermgrd
|
|
|
|
|
2018-11-28 23:58:59 -06:00
|
|
|
supervisorctl start nbrmgrd
|
|
|
|
|
2019-04-23 22:38:08 -05:00
|
|
|
supervisorctl start vxlanmgrd
|
|
|
|
|
2019-10-29 20:05:55 -05:00
|
|
|
supervisorctl start sflowmgrd
|
|
|
|
|
2020-01-29 19:40:43 -06:00
|
|
|
supervisorctl start natmgrd
|
|
|
|
|
|
|
|
supervisorctl start natsyncd
|
|
|
|
|
2017-10-24 00:01:42 -05:00
|
|
|
# Start arp_update when VLAN exists
|
2017-11-30 16:59:25 -06:00
|
|
|
VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
|
|
|
|
if [ "$VLAN" != "" ]; then
|
|
|
|
supervisorctl start arp_update
|
|
|
|
fi
|