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