xref: /freebsd/libexec/rc/rc.d/pppoed (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6# PROVIDE: pppoed
7# REQUIRE: NETWORKING
8# BEFORE: DAEMON
9# KEYWORD: nojail
10
11. /etc/rc.subr
12
13name="pppoed"
14desc="Handle incoming PPP over Ethernet connections"
15rcvar="pppoed_enable"
16start_cmd="pppoed_start"
17# XXX stop_cmd will not be straightforward
18stop_cmd=":"
19
20pppoed_start()
21{
22	local _opts
23
24	if [ -n "${pppoed_provider}" ]; then
25			pppoed_flags="${pppoed_flags} -p ${pppoed_provider}"
26	fi
27	startmsg 'Starting pppoed'
28	_opts=$-; set -f
29	/usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface}
30	set +f; set -${_opts}
31}
32
33load_rc_config $name
34run_rc_command "$1"
35