summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-10-27 06:30:43 +0000
committerpeter <peter@FreeBSD.org>1996-10-27 06:30:43 +0000
commit445161a90059a82678580598a8b93259c815b9fb (patch)
tree4825b8de0a66d6a074a832ab5e609bcf4497b161 /etc
parent354a4db3b5ff4e1a474ecd6a53a6b494699bb7e5 (diff)
downloadFreeBSD-src-445161a90059a82678580598a8b93259c815b9fb.zip
FreeBSD-src-445161a90059a82678580598a8b93259c815b9fb.tar.gz
Add rudimentry support for ifconfig'ing aliases at boot. Also allow
start_if.<if> to do all the work instead if so configured. With examples.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/netstart19
-rw-r--r--etc/sysconfig9
2 files changed, 25 insertions, 3 deletions
diff --git a/etc/netstart b/etc/netstart
index 922d303..99277d0 100755
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: netstart,v 1.43 1996/04/03 17:13:58 phk Exp $
+# $Id: netstart,v 1.44 1996/04/06 09:24:48 mpp Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -43,8 +43,23 @@ for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
. /etc/start_if.${ifn} ${ifn}
fi
+ # Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
- ifconfig ${ifn} ${ifconfig_args}
+ if [ -n "${ifconfig_args}" ] ; then
+ ifconfig ${ifn} ${ifconfig_args}
+ fi
+ # Check to see if aliases need to be added
+ alias=0
+ while :
+ do
+ eval ifconfig_args=\$ifconfig_${ifn}_alias${alias}
+ if [ -n "${ifconfig_args}" ]; then
+ ifconfig ${ifn} ${ifconfig_args} alias
+ alias=`expr ${alias} + 1`
+ else
+ break;
+ fi
+ done
ifconfig ${ifn}
done
diff --git a/etc/sysconfig b/etc/sysconfig
index f1d988a..75c49a7 100644
--- a/etc/sysconfig
+++ b/etc/sysconfig
@@ -4,7 +4,7 @@
# This is sysconfig - a file full of useful variables that you can set
# to change the default startup behavior of your system.
#
-# $Id: sysconfig,v 1.50 1996/09/09 00:17:14 ache Exp $
+# $Id: sysconfig,v 1.51 1996/10/21 20:09:27 wpaul Exp $
######################### Start Of Local Configuration Section ###########
@@ -107,6 +107,8 @@ weak_mountd_authentication=NO
#
# Set to the list of network devices on this host. You must have an
# ifconfig_${network_interface} line for each interface listed here.
+# Extra addresses may be specified with sequentual _alias<N> lines.
+#
# for example:
#
# network_interfaces="ed0 sl0 lo0"
@@ -114,6 +116,11 @@ weak_mountd_authentication=NO
# ifconfig_ed0="inet 10.0.0.1 netmask 0xffffff00"
# ifconfig_sl0="inet 10.0.1.0 netmask 0xffffff00"
# ifconfig_lo0="inet localhost"
+# ifconfig_ed0_alias0="inet 10.0.2.1 netmask 0xffffff00"
+# ifconfig_ed0_alias1="inet 10.0.2.2 netmask 0xffffffff"
+#
+# Alternatively, /etc/start_if.${network_interface} is run if it exists.
+# This script can be used as an alternative to the ifconfig_<xxx> lines.
#
network_interfaces="lo0"
OpenPOWER on IntegriCloud