summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/sppp
blob: 4ade9cdd9afcb6343d579e9a0d46c791ab4bd640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: sppp
# REQUIRE: root
# BEFORE: netif
# KEYWORD: FreeBSD

. /etc/rc.subr

name="sppp"
start_cmd="sppp_start"
stop_cmd=":"

sppp_start()
{
	# Special options for sppp(4) interfaces go here.  These need
	# to go _before_ the general ifconfig since in the case
	# of hardwired (no link1 flag) but required authentication, you
	# cannot pass auth parameters down to the already running interface.
	#
	for ifn in ${sppp_interfaces}; do
		eval spppcontrol_args=\$spppconfig_${ifn}
		if [ -n "${spppcontrol_args}" ]; then
			# The auth secrets might contain spaces; in order
			# to retain the quotation, we need to eval them
			# here.
			eval spppcontrol ${ifn} ${spppcontrol_args}
		fi
	done
}

load_rc_config $name
run_rc_command "$1"
OpenPOWER on IntegriCloud