route6d revision 103019
1141586Simp#!/bin/sh
2141586Simp#
3141586Simp# $NetBSD: route6d,v 1.5 2002/03/22 04:34:00 thorpej Exp $
4141586Simp# $FreeBSD: head/etc/rc.d/route6d 103019 2002-09-06 16:18:05Z gordon $
5141586Simp#
6141586Simp
7141586Simp# PROVIDE: route6d
8141586Simp# REQUIRE: DAEMON
9141586Simp# BEFORE:  LOGIN
10141586Simp# KEYWORD: FreeBSD NetBSD
11141586Simp
12141586Simp. /etc/rc.subr
13141586Simp
14141586Simpname="route6d"
15141586Simp
16141586Simp# XXX - Executable may be in a different location. The $name variable
17141586Simp#       is different from the variable in rc.conf(5) so the
18141586Simp#       subroutines in rc.subr won't catch it. In this case, it
19141586Simp#	is also needed by the eval statement in the FreeBSD conditional.
20141586Simp#
21141586Simpload_rc_config $name
22141586Simp
23141586Simpcase ${OSTYPE} in
24141586SimpFreeBSD)
25141586Simp	rcvar="ipv6_router_enable"
26141586Simp	command="${ipv6_router:-/usr/sbin/${name}}"
27141586Simp	eval ${name}_flags=\"${ipv6_router_flags}\"
28141586Simp	;;
29141586SimpNetBSD)
30141586Simp	rcvar=$name
31141586Simp	command="/usr/sbin/${name}"
32141586Simp	;;
33141586Simpesac
34141586Simp
35141586Simprun_rc_command "$1"
36141586Simp