Module Name: src
Committed By: is
Date: Fri Dec 29 18:15:49 UTC 2017
Modified Files:
src/etc/defaults: rc.conf
src/etc/mtree: special
Added Files:
src/etc/rc.d: dhcpd6
Log Message:
Add startup file for dhcp v6 with builtin isc-dhcp. Alas, this needs to
be a seperate process. On the positive side: this can't break the dhcpd
for IPv4 when tested.
To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/etc/defaults/rc.conf
cvs rdiff -u -r1.160 -r1.161 src/etc/mtree/special
cvs rdiff -u -r0 -r1.1 src/etc/rc.d/dhcpd6
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.139 src/etc/defaults/rc.conf:1.140
--- src/etc/defaults/rc.conf:1.139 Sat Jan 7 20:00:33 2017
+++ src/etc/defaults/rc.conf Fri Dec 29 18:15:48 2017
@@ -1,4 +1,4 @@
-# $NetBSD: rc.conf,v 1.139 2017/01/07 20:00:33 christos Exp $
+# $NetBSD: rc.conf,v 1.140 2017/12/29 18:15:48 is Exp $
#
# /etc/defaults/rc.conf --
# default configuration of /etc/rc.conf
@@ -269,6 +269,7 @@ ldpd=NO
rarpd=NO rarpd_flags="-a"
bootparamd=NO bootparamd_flags=""
dhcpd=NO dhcpd_flags="-q"
+dhcpd6=NO dhcpd6_flags="-q -cf /etc/dhcpd6.conf"
dhcrelay=NO dhcrelay_flags=""
rbootd=NO rbootd_flags=""
mopd=NO mopd_flags="-a"
Index: src/etc/mtree/special
diff -u src/etc/mtree/special:1.160 src/etc/mtree/special:1.161
--- src/etc/mtree/special:1.160 Mon Feb 20 13:45:43 2017
+++ src/etc/mtree/special Fri Dec 29 18:15:49 2017
@@ -1,4 +1,4 @@
-# $NetBSD: special,v 1.160 2017/02/20 13:45:43 christos Exp $
+# $NetBSD: special,v 1.161 2017/12/29 18:15:49 is Exp $
# @(#)special 8.2 (Berkeley) 1/23/94
#
# This file may be overwritten on upgrades.
@@ -62,6 +62,7 @@
./etc/dhcpcd.duid type=file mode=0644 optional
./etc/dhcpcd.hook type=file mode=0644 optional
./etc/dhcpd.conf type=file mode=0644 optional
+./etc/dhcpd6.conf type=file mode=0644 optional
./etc/disktab type=file mode=0644
./etc/dm.conf type=file mode=0644
./etc/dumpdates type=file mode=0664 gname=operator optional tags=exclude
@@ -202,6 +203,7 @@
./etc/rc.d/dhclient type=file mode=0555
./etc/rc.d/dhcpcd type=file mode=0555
./etc/rc.d/dhcpd type=file mode=0555
+./etc/rc.d/dhcpd6 type=file mode=0555
./etc/rc.d/dhcrelay type=file mode=0555
./etc/rc.d/dmesg type=file mode=0555
./etc/rc.d/downinterfaces type=file mode=0555
Added files:
Index: src/etc/rc.d/dhcpd6
diff -u /dev/null src/etc/rc.d/dhcpd6:1.1
--- /dev/null Fri Dec 29 18:15:49 2017
+++ src/etc/rc.d/dhcpd6 Fri Dec 29 18:15:49 2017
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $NetBSD: dhcpd6,v 1.1 2017/12/29 18:15:49 is Exp $
+#
+
+# PROVIDE: dhcpd6
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="dhcpd6"
+rcvar=$name
+command="/usr/sbin/dhcpd"
+start_precmd="dhcpd6_precmd"
+pidfile="/var/run/${name}.pid"
+required_files="/etc/${name}.conf"
+
+dhcpd6_precmd()
+{
+ if [ ! -e "/var/db/${name}.leases" ]; then
+ echo "Creating /var/db/${name}.leases"
+ touch /var/db/${name}.leases
+ fi
+}
+
+load_rc_config $name
+dhcpd6_flags="-6 $dhcpd6_flags"
+run_rc_command "$1"