Subject: Re: Why is ifconfig.ae0 better than hostname.ae0?
To: None <tech-net@NetBSD.ORG>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 06/25/1997 19:01:34
[Old mail being hauled out and replied to...]
> A proposed solution is as follows:
> a) add an option to ifconfig(8) which returns the inet source
> address for a given interface.
What's wrong with
ifconfig $interface | awk '$1=="inet" { print $2; }'
Why add an inet-specific option? (If you do add such an option, I
would strongly urge that it take an address family name and print out
all the interface's addresses in that address family. As worded, the
option would be useless for non-inet networking and borderline useless
for interfaces with zero or more than two inet addresses.)
As for the localhost routes, I'd probably do something like
ifconfig -a | sed -n -e '/^[ ]*inet /s/^[ ]*inet \([^ ]*\) .*/route add \1 127.0.0.1/p' | sh
once.
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B