Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Add startup file for dhcp v6 with builtin isc-dhcp. Alas...
details: https://anonhg.NetBSD.org/src/rev/9c73cacd0d1b
branches: trunk
changeset: 358446:9c73cacd0d1b
user: is <is%NetBSD.org@localhost>
date: Fri Dec 29 18:15:48 2017 +0000
description:
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.
diffstat:
etc/defaults/rc.conf | 3 ++-
etc/mtree/special | 4 +++-
etc/rc.d/dhcpd6 | 29 +++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)
diffs (75 lines):
diff -r f44ab484eb90 -r 9c73cacd0d1b etc/defaults/rc.conf
--- a/etc/defaults/rc.conf Fri Dec 29 16:13:26 2017 +0000
+++ b/etc/defaults/rc.conf Fri Dec 29 18:15:48 2017 +0000
@@ -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 @@
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"
diff -r f44ab484eb90 -r 9c73cacd0d1b etc/mtree/special
--- a/etc/mtree/special Fri Dec 29 16:13:26 2017 +0000
+++ b/etc/mtree/special Fri Dec 29 18:15:48 2017 +0000
@@ -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
diff -r f44ab484eb90 -r 9c73cacd0d1b etc/rc.d/dhcpd6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/dhcpd6 Fri Dec 29 18:15:48 2017 +0000
@@ -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"
Home |
Main Index |
Thread Index |
Old Index