Deleted Added
full compact
routed (124616) routed (124622)
1#!/bin/sh
2#
3# $NetBSD: routed,v 1.7 2002/03/22 04:34:00 thorpej Exp $
1#!/bin/sh
2#
3# $NetBSD: routed,v 1.7 2002/03/22 04:34:00 thorpej Exp $
4# $FreeBSD: head/etc/rc.d/routed 124616 2004-01-17 10:16:38Z mtm $
4# $FreeBSD: head/etc/rc.d/routed 124622 2004-01-17 10:59:43Z mtm $
5#
6
7# PROVIDE: routed
8# REQUIRE: netif routing
9# KEYWORD: FreeBSD
10
11. /etc/rc.subr
12
13name="routed"
14
15# XXX - Executable may be in a different location. The $name variable
16# is different from the variable in rc.conf(5) so the
17# subroutines in rc.subr won't catch it.
18#
19load_rc_config $name
20
5#
6
7# PROVIDE: routed
8# REQUIRE: netif routing
9# KEYWORD: FreeBSD
10
11. /etc/rc.subr
12
13name="routed"
14
15# XXX - Executable may be in a different location. The $name variable
16# is different from the variable in rc.conf(5) so the
17# subroutines in rc.subr won't catch it.
18#
19load_rc_config $name
20
21case ${OSTYPE} in
22FreeBSD)
23 rcvar="router_enable"
24 command="${router:-/sbin/${name}}"
25 eval ${name}_flags=${router_flags}
26 start_precmd=
27 ;;
28NetBSD)
29 rcvar=${name}
30 command="/sbin/${name}"
31 start_precmd="routed_precmd"
32 ;;
33esac
21rcvar="router_enable"
22command="${router:-/sbin/${name}}"
23eval ${name}_flags=${router_flags}
24start_precmd=
34
35routed_precmd()
36{
37 if checkyesno gated && checkyesno routed; then
38 warn "gated and routed both requested to be run: only running gated."
39 return 1
40 fi
41}
42
43run_rc_command "$1"
25
26routed_precmd()
27{
28 if checkyesno gated && checkyesno routed; then
29 warn "gated and routed both requested to be run: only running gated."
30 return 1
31 fi
32}
33
34run_rc_command "$1"