diff options
author | peter <peter@FreeBSD.org> | 1996-10-27 06:30:43 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-10-27 06:30:43 +0000 |
commit | 445161a90059a82678580598a8b93259c815b9fb (patch) | |
tree | 4825b8de0a66d6a074a832ab5e609bcf4497b161 /etc/netstart | |
parent | 354a4db3b5ff4e1a474ecd6a53a6b494699bb7e5 (diff) | |
download | FreeBSD-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/netstart')
-rwxr-xr-x | etc/netstart | 19 |
1 files changed, 17 insertions, 2 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 |