2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
2016-10-07 12:41:44 -05:00
|
|
|
|
|
|
|
TEAMD_CONF_PATH=/etc/teamd
|
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
rm -rf $TEAMD_CONF_PATH
|
|
|
|
mkdir -p $TEAMD_CONF_PATH
|
2016-10-07 12:41:44 -05:00
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
for pc in `sonic-cfggen -m /etc/sonic/minigraph.xml -v "minigraph_portchannels.keys() | join(' ')"`; do
|
|
|
|
sonic-cfggen -m /etc/sonic/minigraph.xml -a '{"pc":"'$pc'"}' -t /usr/share/sonic/templates/teamd.j2 > $TEAMD_CONF_PATH/$pc.conf
|
2017-02-15 10:54:10 -06:00
|
|
|
done
|
2017-05-08 17:43:31 -05:00
|
|
|
|
|
|
|
mkdir -p /var/sonic
|
|
|
|
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
|
|
|
|
|
|
|
|
rm -f /var/run/rsyslogd.pid
|
|
|
|
|
|
|
|
supervisorctl start rsyslogd
|
|
|
|
|
|
|
|
supervisorctl start teamd
|
|
|
|
|