syscons - Untangle device attachement from isa?, attach to nexus? instead.
[dragonfly.git] / etc / rc.d / rtadvd
blobd330b89daaff8e6bc2a7b9d2fa8d85c864bf2910
1 #!/bin/sh
3 # $NetBSD: rtadvd,v 1.5 2002/03/22 04:34:00 thorpej Exp $
4 # $FreeBSD: src/etc/rc.d/rtadvd,v 1.5 2003/01/24 00:37:52 mtm Exp $
7 # PROVIDE: rtadvd
8 # REQUIRE: DAEMON
9 # BEFORE: LOGIN
11 . /etc/rc.subr
13 name="rtadvd"
14 rcvar=`set_rcvar`
15 command="/usr/sbin/${name}"
16 start_precmd="rtadvd_precmd"
18 rtadvd_precmd()
20 IS_GATEWAY="checkyesno ipv6_gateway_enable"
21 if ! ${IS_GATEWAY}; then
22 warn \
23 "${name} cannot be used on IPv6 host, only on an IPv6 router."
24 return 1
27 # This should be enabled with a great care.
28 # You may want to fine-tune /etc/rtadvd.conf.
30 # And if you wish your rtadvd to receive and process
31 # router renumbering messages, specify your Router Renumbering
32 # security policy by -R option.
34 # See `man 3 ipsec_set_policy` for IPsec policy specification
35 # details.
36 # (CAUTION: This enables your routers prefix renumbering
37 # from another machine, so if you enable this, do it with
38 # enough care.)
40 # If specific interfaces haven't been specified,
41 # get a list of interfaces and enable it on them
43 case ${rtadvd_interfaces} in
44 '')
45 for i in `ifconfig -l` ; do
46 case $i in
47 lo0|gif[0-9]*|stf[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*)
48 continue
51 rtadvd_interfaces="${rtadvd_interfaces} ${i}"
53 esac
54 done
56 esac
57 command_args="${rtadvd_interfaces}"
58 # Enable Router Renumbering, unicast case
59 # (use correct src/dst addr)
60 # rtadvd -R "in ipsec ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require" ${ipv6_network_interf
61 return 0
64 load_rc_config $name
65 run_rc_command "$1"