#!/bin/sh # # $NetBSD: rtadvd,v 1.5 2002/03/22 04:34:00 thorpej Exp $ # $FreeBSD: src/etc/rc.d/rtadvd,v 1.5 2003/01/24 00:37:52 mtm Exp $ # # PROVIDE: rtadvd # REQUIRE: DAEMON # BEFORE: LOGIN . /etc/rc.subr name="rtadvd" rcvar=`set_rcvar` command="/usr/sbin/${name}" start_precmd="rtadvd_precmd" rtadvd_precmd() { if ! checkyesno ipv6_gateway_enable; then warn "${name} cannot be used on IPv6 host, " \ "only on an IPv6 router." return 1 fi # This should be enabled with a great care. # You may want to fine-tune /etc/rtadvd.conf. # # And if you wish your rtadvd to receive and process # router renumbering messages, specify your Router Renumbering # security policy by -R option. # # If specific interfaces haven't been specified, # get a list of interfaces and enable it on them # case ${rtadvd_interfaces} in '') for i in `ifconfig -l` ; do case $i in lo0|gif[0-9]*|stf[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*) continue ;; *) rtadvd_interfaces="${rtadvd_interfaces} ${i}" ;; esac done ;; esac command_args="${rtadvd_interfaces}" return 0 } load_rc_config $name run_rc_command "$1"