Subject: misc/1365: enhancement: way to handle interface aliases in netstart
To: None <>
From: None <>
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
>Originator:     & E. Metzger
Perry Metzger
>Release:        NetBSD 1.0A
System: NetBSD 1.0A NetBSD 1.0A (TOVE) #0: Wed Aug 2 00:45:51 PDT 1995 i386


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.



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
--- Cut Here ---