diff options
author | jakllsch <jakllsch@pkgsrc.org> | 2013-12-13 16:34:17 +0000 |
---|---|---|
committer | jakllsch <jakllsch@pkgsrc.org> | 2013-12-13 16:34:17 +0000 |
commit | cda907df58fa44cdbf97eadafe8d6da55c387a0f (patch) | |
tree | 0b0de099a1b338bf0b84ec585ff72d7b4d2461e4 /net | |
parent | 1f6311a2606734aa17452ed598fd2fa032e6eac6 (diff) | |
download | pkgsrc-cda907df58fa44cdbf97eadafe8d6da55c387a0f.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/Makefile | 6 | ||||
-rw-r--r-- | net/isc-dhcpd4/PLIST | 3 | ||||
-rwxr-xr-x | net/isc-dhcpd4/files/isc_dhcpd6.sh | 37 |
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" |