sonic-buildimage/dockers/docker-orchagent/start.sh
Andriy Moroz 48b0beb7ff Port speed (#879)
* Add port speed configuration

* Add DeviceInfos support in minigraph parser

* Add cfggen test 'test_minigraph_ethernet_interfaces'

* Fixed PR comments

* Update sonic-swss submodule reference
2017-08-23 19:41:14 -07:00

41 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
mkdir -p /etc/swss/config.d/
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/ipinip.json.j2 > /etc/swss/config.d/ipinip.json
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/mirror.json.j2 > /etc/swss/config.d/mirror.json
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/ports.json.j2 > /etc/swss/config.d/ports.json
export platform=`sonic-cfggen -m /etc/sonic/minigraph.xml -v platform`
rm -f /var/run/rsyslogd.pid
supervisorctl start rsyslogd
# Wait for syncd to start
while true; do
RESULT=$(echo -en "SELECT 1\nHLEN HIDDEN" | redis-cli | sed -n 2p)
if [ "$RESULT" != "0" ]; then
break
fi
sleep 1
done
supervisorctl start orchagent
supervisorctl start portsyncd
supervisorctl start intfsyncd
supervisorctl start neighsyncd
supervisorctl start swssconfig
# Start arp_update when VLAN exists
VLAN=`sonic-cfggen -m /etc/sonic/minigraph.xml -v 'minigraph_vlans.keys() | join(" ")'`
if [ "$VLAN" != "" ]; then
supervisorctl start arp_update
fi