This repository was archived by the owner on Jan 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -12,5 +12,7 @@ RUN apt-get -q -y update \
1212 && apt-get -q -y clean \
1313 && rm -rf /var/lib/apt/lists/*
1414
15+ ENV DHCPD_PROTOCOL=4
16+
1517COPY util/entrypoint.sh /entrypoint.sh
1618ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -12,5 +12,7 @@ RUN apt-get -q -y update \
1212 && apt-get -q -y clean \
1313 && rm -rf /var/lib/apt/lists/*
1414
15+ ENV DHCPD_PROTOCOL=4
16+
1517COPY util/entrypoint.sh /entrypoint.sh
1618ENTRYPOINT ["/entrypoint.sh"]
Original file line number Diff line number Diff line change 3939
4040To use a DHCPv6-Server you have to pass ` DHCPv6 ` as enviroment variable
4141
42- ` docker run -it --rm --init -e DHCPv6 --net host -v "$(pwd)/data":/data networkboot/dhcpd eth0 `
42+ ` docker run -it --rm --init -e DHCPD_PROTOCOL=6 --net host -v "$(pwd)/data":/data networkboot/dhcpd eth0 `
4343
4444
4545Notes
Original file line number Diff line number Diff line change @@ -69,12 +69,7 @@ if [ -n "$IFACE" ]; then
6969 echo " You must add the 'docker run' option '--net=host' if you want to provide DHCP service to the host network."
7070 fi
7171
72- # check if v6 should be used
73- if [ -n " $DHCPv6 " ]; then
74- $run /usr/sbin/dhcpd -6 -f -d --no-pid -cf " $data_dir /dhcpd.conf" -lf " $data_dir /dhcpd.leases" $IFACE
75- else
76- $run /usr/sbin/dhcpd -4 -f -d --no-pid -cf " $data_dir /dhcpd.conf" -lf " $data_dir /dhcpd.leases" $IFACE
77- fi
72+ $run /usr/sbin/dhcpd -$DHCPD_PROTOCOL -f -d --no-pid -cf " $data_dir /dhcpd.conf" -lf " $data_dir /dhcpd.leases" $IFACE
7873else
7974 # Run another binary
8075 $run " $@ "
You can’t perform that action at this time.
0 commit comments