2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
2016-07-26 14:01:58 -05:00
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
mkdir -p /etc/swss/config.d/
|
2017-04-21 16:28:30 -05:00
|
|
|
|
2020-08-17 17:47:52 -05:00
|
|
|
CFGGEN_PARAMS=" \
|
|
|
|
-d \
|
|
|
|
-y /etc/sonic/constants.yml \
|
|
|
|
-t /usr/share/sonic/templates/switch.json.j2,/etc/swss/config.d/switch.json \
|
|
|
|
-t /usr/share/sonic/templates/ipinip.json.j2,/etc/swss/config.d/ipinip.json \
|
|
|
|
-t /usr/share/sonic/templates/ports.json.j2,/etc/swss/config.d/ports.json \
|
|
|
|
-t /usr/share/sonic/templates/copp.json.j2,/etc/swss/config.d/00-copp.config.json \
|
|
|
|
-t /usr/share/sonic/templates/vlan_vars.j2 \
|
|
|
|
"
|
|
|
|
VLAN=$(sonic-cfggen $CFGGEN_PARAMS)
|
2017-02-02 22:34:34 -06:00
|
|
|
|
2018-09-24 16:56:37 -05:00
|
|
|
# Executed HWSKU specific initialization tasks.
|
|
|
|
if [ -x /usr/share/sonic/hwsku/hwsku-init ]; then
|
|
|
|
/usr/share/sonic/hwsku/hwsku-init
|
|
|
|
fi
|
|
|
|
|
2017-05-15 19:06:19 -05:00
|
|
|
# Start arp_update when VLAN exists
|
|
|
|
if [ "$VLAN" != "" ]; then
|
2020-09-17 20:33:10 -05:00
|
|
|
cp /usr/share/sonic/templates/arp_update.conf /etc/supervisor/conf.d/
|
2017-05-15 19:06:19 -05:00
|
|
|
fi
|
2020-05-15 19:09:16 -05:00
|
|
|
|
|
|
|
exec /usr/bin/supervisord
|