Subject: Re: do you like or hate this enhancement
To: Perry E. Metzger <perry@piermont.com>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: current-users
Date: 08/17/1995 22:22:00
> of specifying these addresses. It goes at the end of /etc/netstart. Do
> people like the idea or hate it?

Just as a data point, I used the following on a SunOS box that needed
to enable several virtual interfaces on le0

Note: this is for SunOS...
--------8<--------
# <sjg> Configure virtual interfaces...

# first we need our ethernet address:
ethaddr=`ifconfig le0 | awk '/ether/ { print $2 }'`

# the following relies on entries in /etc/hosts like:
#1.2.3.4 f.q.d.n vif0
# ie, vifN is last word on line.

awk '/[         ]vif[0-9]/ { 
        print "ifconfig " $NF, $1, "up; arp -s", $1, eth, "pub;" 
}' eth=$ethaddr /etc/hosts | sh
--------8<--------

You could do something similar with NetBSD.  The advantage of the
above is that /etc/hosts is all you need edit.  

Of course you might want to do without awk at boot time, and the above
could certainly be done without it.  [I wrote dirname as a shell
function for my rc.sh :-)]

--sjg