svn commit: r203433 - in head/etc: . defaults rc.d
Hajimu UMEMOTO
ume at FreeBSD.org
Wed Feb 3 16:18:42 UTC 2010
Author: ume
Date: Wed Feb 3 16:18:42 2010
New Revision: 203433
URL: http://svn.freebsd.org/changeset/base/203433
Log:
Add rc.d script for the rtsold(8) daemon.
The rtsol(8) handles just one RA then exit. So, the OtherConfig flag
may not be handled well by rtsol(8) in the environment where there are
multiple RA servers on the segment. In such case, rtsold(8) will be
your friend.
Reviewed by: hrs
MFC after: 2 weeks
Added:
head/etc/rc.d/rtsold (contents, props changed)
Modified:
head/etc/defaults/rc.conf
head/etc/network.subr
head/etc/rc.d/Makefile
Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf Wed Feb 3 16:04:20 2010 (r203432)
+++ head/etc/defaults/rc.conf Wed Feb 3 16:18:42 2010 (r203433)
@@ -460,6 +460,10 @@ ipv6_default_interface="NO" # Default ou
# Now this works only for IPv6 link local
# multicast addrs.
rtsol_flags="" # Flags to IPv6 router solicitation.
+rtsold_enable="NO" # Set to YES to enable an IPv6 router
+ # solicitation daemon.
+rtsold_flags="-a" # Flags to an IPv6 router solicitation
+ # daemon.
rtadvd_enable="NO" # Set to YES to enable an IPv6 router
# advertisement daemon. If set to YES,
# this router becomes a possible candidate
Modified: head/etc/network.subr
==============================================================================
--- head/etc/network.subr Wed Feb 3 16:04:20 2010 (r203432)
+++ head/etc/network.subr Wed Feb 3 16:18:42 2010 (r203433)
@@ -882,7 +882,9 @@ ipv6_accept_rtadv_up()
{
if ipv6_autoconfif $1; then
ifconfig $1 inet6 accept_rtadv up
- rtsol ${rtsol_flags} $1
+ if ! checkyesno rtsold_enable; then
+ rtsol ${rtsol_flags} $1
+ fi
fi
}
Modified: head/etc/rc.d/Makefile
==============================================================================
--- head/etc/rc.d/Makefile Wed Feb 3 16:04:20 2010 (r203432)
+++ head/etc/rc.d/Makefile Wed Feb 3 16:18:42 2010 (r203433)
@@ -30,7 +30,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI
powerd power_profile ppp pppoed pwcheck \
quota \
random rarpd resolv rfcomm_pppd_server root \
- route6d routed routing rpcbind rtadvd rwho \
+ route6d routed routing rpcbind rtadvd rtsold rwho \
savecore sdpd securelevel sendmail \
serial sppp statd static_arp stf swap1 \
syscons sysctl syslogd \
Added: head/etc/rc.d/rtsold
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/etc/rc.d/rtsold Wed Feb 3 16:18:42 2010 (r203433)
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: rtsold
+# REQUIRE: netif
+# BEFORE: NETWORKING
+# KEYWORD: nojail
+
+. /etc/rc.subr
+
+name="rtsold"
+rcvar=`set_rcvar`
+command="/usr/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+start_postcmd="rtsold_poststart"
+
+rtsold_poststart()
+{
+ # wait for DAD
+ sleep $(($(${SYSCTL_N} net.inet6.ip6.dad_count) + 1))
+}
+
+load_rc_config $name
+run_rc_command "$1"
More information about the svn-src-head
mailing list