1#!/bin/sh 2# 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 $ 5# 6 7# PROVIDE: rtadvd 8# REQUIRE: DAEMON 9# BEFORE: LOGIN 10 11. /etc/rc.subr 12 13name="rtadvd" 14rcvar=`set_rcvar` 15command="/usr/sbin/${name}" 16start_precmd="rtadvd_precmd" 17 18rtadvd_precmd() 19{ 20 if ! checkyesno ipv6_gateway_enable; then 21 warn "${name} cannot be used on IPv6 host, " \ 22 "only on an IPv6 router." 23 return 1 24 fi 25 26 # This should be enabled with a great care. 27 # You may want to fine-tune /etc/rtadvd.conf. 28 # 29 # And if you wish your rtadvd to receive and process 30 # router renumbering messages, specify your Router Renumbering 31 # security policy by -R option. 32 # 33 # If specific interfaces haven't been specified, 34 # get a list of interfaces and enable it on them 35 # 36 case ${rtadvd_interfaces} in 37 '') 38 for i in `ifconfig -l` ; do 39 case $i in 40 lo0|gif[0-9]*|stf[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) 41 continue 42 ;; 43 *) 44 rtadvd_interfaces="${rtadvd_interfaces} ${i}" 45 ;; 46 esac 47 done 48 ;; 49 esac 50 command_args="${rtadvd_interfaces}" 51 return 0 52} 53 54load_rc_config $name 55run_rc_command "$1" 56