Add "dual dhclient" script, which can be specified as dhclient_program in

rc.conf in order to launch the base system dhclient for IPv4 and the ISC
dhcp client for IPv6.

I'm not sure if this will be useful to anyone else, but adding this trivial
port will simplify the configuration of IPv6 on Amazon EC2 instances.  I
hope this port becomes redundant in the future due to the base system
gaining support for IPv6 DHCP.
This commit is contained in:
Colin Percival 2017-01-15 09:00:18 +00:00
parent 4ab0a1aa52
commit d02eae1e93
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=431537
5 changed files with 41 additions and 0 deletions

View File

@ -119,6 +119,7 @@
SUBDIR += dshell
SUBDIR += dtcp
SUBDIR += dtcpclient
SUBDIR += dual-dhclient
SUBDIR += e169-stats
SUBDIR += easysoap
SUBDIR += echoping

View File

@ -0,0 +1,25 @@
# $FreeBSD$
PORTNAME= dual-dhclient
PORTVERSION= 1.0
CATEGORIES= net
MASTER_SITES= # none
DISTFILES= # none
EXTRACT_ONLY= # none
MAINTAINER= cperciva@FreeBSD.org
COMMENT= Spawns dhclients for a dual-stack network
LICENSE= PD
RUN_DEPENDS= ${LOCALBASE}/sbin/dhclient:net/isc-dhcp43-client
NO_WRKSUBDIR= yes
NO_BUILD= yes
PLIST_FILES= sbin/dual-dhclient
do-install:
${INSTALL_SCRIPT} ${FILESDIR}/dual-dhclient ${STAGEDIR}${PREFIX}/sbin
.include <bsd.port.mk>

View File

@ -0,0 +1,8 @@
#!/bin/sh
# $FreeBSD$
# Public domain
/sbin/dhclient "$@"
/usr/local/sbin/dhclient -6 -nw -cf /dev/null "$@"

View File

@ -0,0 +1,3 @@
This port provides a script which spawns both /sbin/dhclient and
/usr/local/sbin/dhclient -6; this simplifies the configuration needed to
run DHCP on both protocols of a dual-stack network.

View File

@ -0,0 +1,4 @@
To enable dual-stack DHCP, set
dhclient_program="/usr/local/sbin/dual-dhclient"
in /etc/rc.conf (and make sure the appropriate ifconfig_* lines include
DHCP or SYNCDHCP).