summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1999-01-13 17:32:37 +0000
committerjoerg <joerg@FreeBSD.org>1999-01-13 17:32:37 +0000
commitf2cbb353d70beab084a40629b3fbd1223153d20a (patch)
tree9072457d2fd647fc8d11ce098d3e384cd8dda0bf /etc
parent0b88f11ae4c750149f108c864c31cdefa4ef9397 (diff)
downloadFreeBSD-src-f2cbb353d70beab084a40629b3fbd1223153d20a.zip
FreeBSD-src-f2cbb353d70beab084a40629b3fbd1223153d20a.tar.gz
Add some special hooks for sppp(4) interfaces. In addition to the
normal ifconfig stuff, one might need to pass down authentication parameters for them. This is closely tied to Hellmuth's impending rc patches for ISDN, but sppp can also be used separately (thus it doesn't go directly into the planned ISDN section of rc.conf). Reviewed by: hm
Diffstat (limited to 'etc')
-rw-r--r--etc/network.subr16
-rw-r--r--etc/rc.conf8
-rw-r--r--etc/rc.d/netoptions16
-rw-r--r--etc/rc.d/network116
-rw-r--r--etc/rc.d/network216
-rw-r--r--etc/rc.d/network316
-rw-r--r--etc/rc.d/routing16
-rw-r--r--etc/rc.network16
8 files changed, 112 insertions, 8 deletions
diff --git a/etc/network.subr b/etc/network.subr
index e3c7c8d..49e936a 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.37 1999/01/03 22:19:23 jkh Exp $
+# $Id: rc.network,v 1.38 1999/01/13 08:20:55 hm Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -36,6 +36,20 @@ network_pass1() {
. /etc/rc.isdn
fi
+ # Special options for sppp(4) interfaces go here. These need
+ # to go _before_ the general ifconfig section, 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
+
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
diff --git a/etc/rc.conf b/etc/rc.conf
index 5483d86..a1f9556 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -6,7 +6,7 @@
#
# All arguments must be in double or single quotes.
#
-# $Id: rc.conf,v 1.73 1999/01/10 22:06:22 n_hibma Exp $
+# $Id: rc.conf,v 1.74 1999/01/13 08:20:54 hm Exp $
##############################################################
### Important initial Boot-time options #####################
@@ -38,6 +38,12 @@ tcp_extensions="NO" # Disallow RFC1323 extensions (or YES).
network_interfaces="lo0" # List of network interfaces (lo0 is loopback).
ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
#ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
+#
+# If you have any sppp(4) interfaces above, you might also want to set
+# the following parameters. Refer to spppcontrol(8) for their meaning.
+sppp_interfaces="" # List of sppp interfaces.
+#sppp_interfaces="isp0" # example: sppp over ISDN
+#spppconfig_isp0="authproto=chap myauthname=foo myauthsecret='top secret' hisauthname=some-gw hisauthsecret='another secret'"
### Network daemon (miscellaneous) & NFS options: ###
syslogd_enable="YES" # Run syslog daemon (or NO).
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions
index e3c7c8d..49e936a 100644
--- a/etc/rc.d/netoptions
+++ b/etc/rc.d/netoptions
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.37 1999/01/03 22:19:23 jkh Exp $
+# $Id: rc.network,v 1.38 1999/01/13 08:20:55 hm Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -36,6 +36,20 @@ network_pass1() {
. /etc/rc.isdn
fi
+ # Special options for sppp(4) interfaces go here. These need
+ # to go _before_ the general ifconfig section, 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
+
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index e3c7c8d..49e936a 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.37 1999/01/03 22:19:23 jkh Exp $
+# $Id: rc.network,v 1.38 1999/01/13 08:20:55 hm Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -36,6 +36,20 @@ network_pass1() {
. /etc/rc.isdn
fi
+ # Special options for sppp(4) interfaces go here. These need
+ # to go _before_ the general ifconfig section, 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
+
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
diff --git a/etc/rc.d/network2 b/etc/rc.d/network2
index e3c7c8d..49e936a 100644
--- a/etc/rc.d/network2
+++ b/etc/rc.d/network2
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.37 1999/01/03 22:19:23 jkh Exp $
+# $Id: rc.network,v 1.38 1999/01/13 08:20:55 hm Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -36,6 +36,20 @@ network_pass1() {
. /etc/rc.isdn
fi
+ # Special options for sppp(4) interfaces go here. These need
+ # to go _before_ the general ifconfig section, 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
+
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
diff --git a/etc/rc.d/network3 b/etc/rc.d/network3
index e3c7c8d..49e936a 100644
--- a/etc/rc.d/network3
+++ b/etc/rc.d/network3
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.37 1999/01/03 22:19:23 jkh Exp $
+# $Id: rc.network,v 1.38 1999/01/13 08:20:55 hm Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -36,6 +36,20 @@ network_pass1() {
. /etc/rc.isdn
fi
+ # Special options for sppp(4) interfaces go here. These need
+ # to go _before_ the general ifconfig section, 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
+
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
diff --git a/etc/rc.d/routing b/etc/rc.d/routing
index e3c7c8d..49e936a 100644
--- a/etc/rc.d/routing
+++ b/etc/rc.d/routing
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.37 1999/01/03 22:19:23 jkh Exp $
+# $Id: rc.network,v 1.38 1999/01/13 08:20:55 hm Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -36,6 +36,20 @@ network_pass1() {
. /etc/rc.isdn
fi
+ # Special options for sppp(4) interfaces go here. These need
+ # to go _before_ the general ifconfig section, 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
+
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
diff --git a/etc/rc.network b/etc/rc.network
index e3c7c8d..49e936a 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.37 1999/01/03 22:19:23 jkh Exp $
+# $Id: rc.network,v 1.38 1999/01/13 08:20:55 hm Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -36,6 +36,20 @@ network_pass1() {
. /etc/rc.isdn
fi
+ # Special options for sppp(4) interfaces go here. These need
+ # to go _before_ the general ifconfig section, 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
+
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
OpenPOWER on IntegriCloud