tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: /etc/rc.d/dhcpd6 (correction)
Hi,
I need to run dhcpd for ipv6, so I've written a rc.d setup for it.
In beta test on netbsd-7.1
Corrected file attached (shouldn't have retyped instead of copying from
the router), patch below. Comments?
Regards,
-is
Note: -6 switches the default pid and lease files already.
? rc.d/dhcpd6
Index: defaults/rc.conf
===================================================================
RCS file: /cvsroot/src/etc/defaults/rc.conf,v
retrieving revision 1.139
diff -u -r1.139 rc.conf
--- defaults/rc.conf 7 Jan 2017 20:00:33 -0000 1.139
+++ defaults/rc.conf 28 Dec 2017 11:57:59 -0000
@@ -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"
Index: mtree/special
===================================================================
RCS file: /cvsroot/src/etc/mtree/special,v
retrieving revision 1.160
diff -u -r1.160 special
--- mtree/special 20 Feb 2017 13:45:43 -0000 1.160
+++ mtree/special 28 Dec 2017 11:57:59 -0000
@@ -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
#!/bin/sh
#
# $NetBSD: dhcpd,v 1.7 2014/07/17 07:17:03 spz Exp $
#
# PROVIDE: dhcpd6
# REQUIRE: DAEMON
# BEFORE: LOGIN
$_rc_subr_loaded . /etc/rc.subr
name="dhcpd6"
rcvar=$name
command="/usr/sbin/${name}"
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"
#!/bin/sh
#
# $NetBSD: dhcpd,v 1.7 2014/07/17 07:17:03 spz 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