Subject: misc/1365: enhancement: way to handle interface aliases in netstart
To: None <gnats-bugs@gnats.netbsd.org>
From: None <perry@piermont.com>
List: netbsd-bugs
Date: 08/17/1995 09:36:05
>Number: 1365
>Category: misc
>Synopsis: enhancement: way to handle interface aliases in netstart
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people (Misc Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Aug 17 09:50:02 1995
>Last-Modified:
>Originator: & E. Metzger
>Organization:
Perry Metzger perry@piermont.com
--
>Release: NetBSD 1.0A
>Environment:
System: NetBSD frankenstein.piermont.com 1.0A NetBSD 1.0A (TOVE) #0: Wed Aug 2 00:45:51 PDT 1995 root@myname.my.domain:/usr/local/src/system/sys/arch/i386/compile/TOVE i386
>Description:
There is no mechanism in the current rc files to handle installing
multiple addresses on an interface ("interface aliases") at boot
time. This small addition to /etc/netstart fixes that by having the
system load interface aliases from /etc/ifaliases, if present.
>How-To-Repeat:
>Fix:
Add the following lines at the end of /etc/netstart. Subsequently, the
system will add any interface aliases in /etc/ifaliases at boot time.
--- Cut Here ---
# /etc/ifaliases, if it exists, contains the names of additional ip
# addresses for each interface. It is formatted as a series of lines
# that contain
# address interface
if [ -f /etc/ifaliases ]; then
(
set -- `cat /etc/ifaliases`
while [ $# -ge 2 ] ; do
ifconfig $2 inet alias $1
route add $1 localhost
shift 2
done
)
fi
--- Cut Here ---
>Audit-Trail:
>Unformatted: