summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjakllsch <jakllsch>2013-12-13 16:34:17 +0000
committerjakllsch <jakllsch>2013-12-13 16:34:17 +0000
commitee7d9d658411525b5df843b343f649ee27651a10 (patch)
tree0b0de099a1b338bf0b84ec585ff72d7b4d2461e4 /net
parent4eb896c2dfc37b6b16f323c4653ab5c081cf8d44 (diff)
downloadpkgsrc-ee7d9d658411525b5df843b343f649ee27651a10.tar.gz
Add isc_dhcpd6 rc.d script for running isc-dhcpd in DHCPv6 mode.
Bump pkgrev.
Diffstat (limited to 'net')
-rw-r--r--net/isc-dhcpd4/Makefile6
-rw-r--r--net/isc-dhcpd4/PLIST3
-rwxr-xr-xnet/isc-dhcpd4/files/isc_dhcpd6.sh37
3 files changed, 42 insertions, 4 deletions
diff --git a/net/isc-dhcpd4/Makefile b/net/isc-dhcpd4/Makefile
index 10959491972..1d495e48c96 100644
--- a/net/isc-dhcpd4/Makefile
+++ b/net/isc-dhcpd4/Makefile
@@ -1,15 +1,15 @@
-# $NetBSD: Makefile,v 1.8 2013/04/10 11:31:27 fhajny Exp $
+# $NetBSD: Makefile,v 1.9 2013/12/13 16:34:17 jakllsch Exp $
#
PKGNAME= isc-dhcpd-${DHVER}
-PKGREVISION= 1
+PKGREVISION= 2
COMMENT= ISC Dynamic Host Configuration Protocol (DHCP) Server
BUILD_SUBDIR= bind includes tests common omapip dhcpctl server
SUBDIR= omapip dhcpctl server
CONF_FILES+= ${EGDIR}/dhcpd.conf ${PKG_SYSCONFDIR}/dhcpd.conf
#CONF_FILES+= ${EGDIR}/dhcpd6.conf ${PKG_SYSCONFDIR}/dhcpd6.conf
-RCD_SCRIPTS= isc_dhcpd
+RCD_SCRIPTS= isc_dhcpd isc_dhcpd6
FILES_SUBST+= DHCP_HOME=${DHCP_HOME}
.include "${.CURDIR}/../isc-dhcp4/options.mk"
diff --git a/net/isc-dhcpd4/PLIST b/net/isc-dhcpd4/PLIST
index f78fdd4efbc..e4ab2390ca2 100644
--- a/net/isc-dhcpd4/PLIST
+++ b/net/isc-dhcpd4/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:09:31 joerg Exp $
+@comment $NetBSD: PLIST,v 1.4 2013/12/13 16:34:17 jakllsch Exp $
bin/omshell
lib/libdhcpctl.a
lib/libomapi.a
@@ -11,3 +11,4 @@ man/man8/dhcpd.8
sbin/dhcpd
share/examples/isc-dhcpd/dhcpd.conf
share/examples/rc.d/isc_dhcpd
+share/examples/rc.d/isc_dhcpd6
diff --git a/net/isc-dhcpd4/files/isc_dhcpd6.sh b/net/isc-dhcpd4/files/isc_dhcpd6.sh
new file mode 100755
index 00000000000..609b805be76
--- /dev/null
+++ b/net/isc-dhcpd4/files/isc_dhcpd6.sh
@@ -0,0 +1,37 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: isc_dhcpd6.sh,v 1.1 2013/12/13 16:34:17 jakllsch Exp $
+#
+
+# PROVIDE: dhcpd6
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="isc_dhcpd6"
+rcvar="${name}"
+command="@PREFIX@/sbin/dhcpd"
+command_args="-6 -cf @PKG_SYSCONFDIR@/dhcpd6.conf"
+pidfile="@VARBASE@/run/isc-dhcp/isc-dhcpd6.pid"
+required_files="@PKG_SYSCONFDIR@/dhcpd6.conf"
+start_precmd="isc_dhcpd_precmd"
+
+isc_dhcpd_precmd()
+{
+ if [ ! -d @VARBASE@/run/isc-dhcp ]; then
+ @MKDIR@ @VARBASE@/run/isc-dhcp
+ @CHMOD@ 0770 @VARBASE@/run/isc-dhcp
+ fi
+
+ if [ ! -f @DHCP_HOME@/dhcpd6.leases ]; then
+ @MKDIR@ @DHCP_HOME@
+ @TOUCH@ @DHCP_HOME@/dhcpd6.leases
+ @CHMOD@ 0640 @DHCP_HOME@/dhcpd6.leases
+ fi
+}
+
+load_rc_config $rcvar
+run_rc_command "$1"