[docker-teamd]: Clean /etc/teamd/ folder before adding new configurations (#451)

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
This commit is contained in:
Shuotian Cheng 2017-03-28 15:49:48 -07:00 committed by GitHub
parent 7a2a374917
commit 27dae90726

View File

@ -1,6 +1,7 @@
#!/bin/bash
mkdir -p /etc/teamd
rm -f /etc/teamd/*
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 >/etc/teamd/$pc.conf