2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
mkdir -p /etc/quagga
|
2017-06-12 13:05:22 -05:00
|
|
|
if [ -f /etc/sonic/bgp_admin.yml ]; then
|
2017-06-21 20:52:50 -05:00
|
|
|
sonic-cfggen -m /etc/sonic/minigraph.xml -y /etc/sonic/bgp_admin.yml -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf
|
2017-06-12 13:05:22 -05:00
|
|
|
else
|
2017-06-21 20:52:50 -05:00
|
|
|
sonic-cfggen -m /etc/sonic/minigraph.xml -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf
|
2017-06-12 13:05:22 -05:00
|
|
|
fi
|
2017-05-08 17:43:31 -05:00
|
|
|
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/quagga/zebra.conf
|
|
|
|
|
|
|
|
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
|
|
|
|
chown root:root /usr/sbin/bgp-isolate
|
|
|
|
chmod 0755 /usr/sbin/bgp-isolate
|
|
|
|
|
|
|
|
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate
|
|
|
|
chown root:root /usr/sbin/bgp-unisolate
|
|
|
|
chmod 0755 /usr/sbin/bgp-unisolate
|
|
|
|
|
|
|
|
mkdir -p /var/sonic
|
|
|
|
echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status
|
2016-07-26 14:01:58 -05:00
|
|
|
|
2017-03-29 20:07:25 -05:00
|
|
|
rm -f /var/run/rsyslogd.pid
|
2017-05-08 17:43:31 -05:00
|
|
|
|
|
|
|
supervisorctl start rsyslogd
|
|
|
|
|
|
|
|
# Quagga has its own monitor process, 'watchquagga'
|
2016-07-26 14:01:58 -05:00
|
|
|
service quagga start
|
2017-05-08 17:43:31 -05:00
|
|
|
|
|
|
|
supervisorctl start fpmsyncd
|
|
|
|
|