9413fa9a7b
- Move front panel ports and port channels MTU and IP configurations out of the current /etc/network/interfaces file and store them in the configuration database. - The default MTU value for both front panel ports and the port channels is 9100. They are set via the minigraph or 9100 by default. - Introduce portmgrd which will pick up the MTU configurations from the configuration database. - The updated intfmgrd will pick up IP address changes from the configuration database. - Update sonic-swss submodule Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
60 lines
1.4 KiB
Bash
Executable File
60 lines
1.4 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
# generate configuration
|
|
|
|
[ -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
|
|
sonic-cfggen -j /etc/sonic/config_db.json -j /etc/sonic/init_cfg.json --print-data > /tmp/config_db.json
|
|
mv /tmp/config_db.json /etc/sonic/config_db.json
|
|
else
|
|
# generate and merge buffers configuration into config file
|
|
sonic-cfggen -t /usr/share/sonic/device/vswitch/buffers.json.j2 > /tmp/buffers.json
|
|
sonic-cfggen -j /etc/sonic/init_cfg.json -j /tmp/buffers.json --print-data > /etc/sonic/config_db.json
|
|
fi
|
|
|
|
mkdir -p /etc/swss/config.d/
|
|
|
|
rm -f /var/run/rsyslogd.pid
|
|
|
|
supervisorctl start rsyslogd
|
|
|
|
mkdir -p /var/run/redis
|
|
|
|
supervisorctl start redis-server
|
|
|
|
/usr/bin/configdb-load.sh
|
|
|
|
supervisorctl start syncd
|
|
|
|
supervisorctl start orchagent
|
|
|
|
supervisorctl start portsyncd
|
|
|
|
supervisorctl start intfsyncd
|
|
|
|
supervisorctl start neighsyncd
|
|
|
|
supervisorctl start teamsyncd
|
|
|
|
supervisorctl start fpmsyncd
|
|
|
|
supervisorctl start portmgrd
|
|
|
|
supervisorctl start intfmgrd
|
|
|
|
supervisorctl start vlanmgrd
|
|
|
|
supervisorctl start zebra
|
|
|
|
supervisorctl start buffermgrd
|
|
|
|
# Start arp_update when VLAN exists
|
|
VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'`
|
|
if [ "$VLAN" != "" ]; then
|
|
supervisorctl start arp_update
|
|
fi
|