sonic-buildimage/dockers/docker-teamd/config.sh
Taoyu Li d9b1000e6c [cfggen] Add support in -v for jinja2 expression (#345)
* Add support in -v for jinja2 expression
* Format json output
2017-02-28 10:52:56 -08:00

12 lines
365 B
Bash
Executable File

#!/bin/bash
mkdir -p /etc/teamd
for pc in `sonic-cfggen -m /etc/sonic/minigraph.xml -v "minigraph_portchannel_interfaces.keys()"`; do
sonic-cfggen -m /etc/sonic/minigraph.xml -a '{"pc":"'$pc'"}' -t /usr/share/sonic/templates/teamd.j2 >/etc/teamd/$pc.conf
done
mkdir -p /var/sonic
echo "# Config files managed by sonic-config-engine" >/var/sonic/config_status