aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.d/sppp
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2002-06-13 22:14:37 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2002-06-13 22:14:37 +0000
commit27bc1b287e497f817ea9d08f319e7c7dceb413c4 (patch)
tree3168589e209abd888b033397e3c46dee6131a116 /etc/rc.d/sppp
parent1cfdefbb9f162da9aa9c045f07394f49aaef1db8 (diff)
downloadsrc-27bc1b287e497f817ea9d08f319e7c7dceb413c4.tar.gz
src-27bc1b287e497f817ea9d08f319e7c7dceb413c4.zip
Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next. Submitted by: Mike Makonnen <makonnen@pacbell.net> Reviewed by: silence on -current and -hackers Prodded by: rwatson
Notes
Notes: svn path=/head/; revision=98184
Diffstat (limited to 'etc/rc.d/sppp')
-rw-r--r--etc/rc.d/sppp36
1 files changed, 36 insertions, 0 deletions
diff --git a/etc/rc.d/sppp b/etc/rc.d/sppp
new file mode 100644
index 000000000000..0080fc7fec19
--- /dev/null
+++ b/etc/rc.d/sppp
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: sppp
+# REQUIRE: root
+# BEFORE: network1
+# 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"