2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/isc-dhcp-relay.j2 > /etc/default/isc-dhcp-relay
|
2017-03-16 12:40:33 -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
|
2017-03-29 20:07:25 -05:00
|
|
|
|
2017-03-30 17:25:31 -05:00
|
|
|
VLAN_IFACE_NAME=`sonic-cfggen -m /etc/sonic/minigraph.xml -v "minigraph_vlan_interfaces[0]['attachto']"`
|
2017-03-16 12:40:33 -05:00
|
|
|
|
|
|
|
# Wait for the VLAN to come up (i.e., 'ip link show' returns 0)
|
|
|
|
until ip link show $VLAN_IFACE_NAME > /dev/null 2>&1; do
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
|
|
|
# Start the DHCP relay
|
2017-05-08 17:43:31 -05:00
|
|
|
supervisorctl start isc-dhcp-relay
|
2017-03-16 12:40:33 -05:00
|
|
|
|