Refactor DHCP relay docker in sonicv2 style (#217)

* Refactor DHCP relay docker in sonicv2 style
This commit is contained in:
Joe LeVeque 2017-01-26 23:36:58 -08:00 committed by GitHub
parent 608980524f
commit c18b65bc16
4 changed files with 15 additions and 8 deletions

View File

@ -10,9 +10,11 @@ RUN apt-get update \
&& apt-get autoclean -y \
&& apt-get autoremove -y
COPY isc-dhcp-relay /etc/default/isc-dhcp-relay
COPY ["isc-dhcp-relay.j2", "/usr/share/dhcp-relay/"]
COPY ["config.sh", "/usr/bin/"]
ENTRYPOINT service rsyslog start \
ENTRYPOINT /usr/bin/config.sh \
&& service rsyslog start \
&& service isc-dhcp-relay start \
&& /bin/bash

View File

@ -0,0 +1,4 @@
#!/bin/bash
sonic-cfggen -m /etc/sonic/minigraph.xml -y /etc/sonic/dhcp_relay.yml -t /usr/share/dhcp-relay/isc-dhcp-relay.j2 > /etc/default/isc-dhcp-relay

View File

@ -1,6 +0,0 @@
SERVERS=""
INTERFACES=""
#-a provides option 82 circuit id information
OPTIONS="-a"

View File

@ -0,0 +1,7 @@
SERVERS="{{ dhcp_servers | join(' ') }}"
INTERFACES="{{ minigraph_vlan_interfaces | join(' ') }}"
# '-a' option provides option 82 circuit id information
OPTIONS="-a"