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