freebsd-dev/libexec/rc/rc.d/pppoed
Jose Luis Duran 19a6267d61 rc.d/*: Use startmsg instead of echo on start messages
By rc.conf(5), setting rc_startmsgs="NO" should silence start messages.

Fix a few rc scripts by using startmsg.

PR:		255207
Reported by:	Jose Luis Duran <jlduran@gmail.com>
Reviewed by:	imp, 0mp
Approved by:	imp (src)
Differential Revision:	https://reviews.freebsd.org/D34514
2022-03-13 18:57:31 +01:00

35 lines
589 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: pppoed
# REQUIRE: NETWORKING
# BEFORE: DAEMON
# KEYWORD: nojail
. /etc/rc.subr
name="pppoed"
desc="Handle incoming PPP over Ethernet connections"
rcvar="pppoed_enable"
start_cmd="pppoed_start"
# XXX stop_cmd will not be straightforward
stop_cmd=":"
pppoed_start()
{
local _opts
if [ -n "${pppoed_provider}" ]; then
pppoed_flags="${pppoed_flags} -p ${pppoed_provider}"
fi
startmsg 'Starting pppoed'
_opts=$-; set -f
/usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface}
set +f; set -${_opts}
}
load_rc_config $name
run_rc_command "$1"