aboutsummaryrefslogtreecommitdiff
path: root/net/dual-dhclient
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2017-01-15 09:00:18 +0000
committerColin Percival <cperciva@FreeBSD.org>2017-01-15 09:00:18 +0000
commitd02eae1e936867888ecbf4e8d02f5fbd24b1c089 (patch)
treeb7a05d321cb505c1d00edc56ecffa10e41f5910c /net/dual-dhclient
parent4ab0a1aa520eedaacb289f640f5e781ef0af0aac (diff)
downloadports-d02eae1e936867888ecbf4e8d02f5fbd24b1c089.tar.gz
ports-d02eae1e936867888ecbf4e8d02f5fbd24b1c089.zip
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.
Notes
Notes: svn path=/head/; revision=431537
Diffstat (limited to 'net/dual-dhclient')
-rw-r--r--net/dual-dhclient/Makefile25
-rw-r--r--net/dual-dhclient/files/dual-dhclient8
-rw-r--r--net/dual-dhclient/pkg-descr3
-rw-r--r--net/dual-dhclient/pkg-message4
4 files changed, 40 insertions, 0 deletions
diff --git a/net/dual-dhclient/Makefile b/net/dual-dhclient/Makefile
new file mode 100644
index 000000000000..4e6cd1719e91
--- /dev/null
+++ b/net/dual-dhclient/Makefile
@@ -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>
diff --git a/net/dual-dhclient/files/dual-dhclient b/net/dual-dhclient/files/dual-dhclient
new file mode 100644
index 000000000000..a3f619cc3fce
--- /dev/null
+++ b/net/dual-dhclient/files/dual-dhclient
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+# Public domain
+
+/sbin/dhclient "$@"
+/usr/local/sbin/dhclient -6 -nw -cf /dev/null "$@"
diff --git a/net/dual-dhclient/pkg-descr b/net/dual-dhclient/pkg-descr
new file mode 100644
index 000000000000..37eac0c1eadc
--- /dev/null
+++ b/net/dual-dhclient/pkg-descr
@@ -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.
diff --git a/net/dual-dhclient/pkg-message b/net/dual-dhclient/pkg-message
new file mode 100644
index 000000000000..612d137b1328
--- /dev/null
+++ b/net/dual-dhclient/pkg-message
@@ -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).