Subject: Re: Why is ifconfig.ae0 better than hostname.ae0?
To: Ted Lemon <mellon@hoffman.vix.com>
From: Andrew Brown <codewarrior@daemon.org>
List: current-users
Date: 04/15/1997 11:11:17
>> and i always thought that was "not right".  don't you want to have all
>> local addresses (ie, all address on all interfaces) going through the
>> loopback back to you?  it seems to work as it is (indicating to me that
>> the entire statement is not needed) but wouldn't it be more correctly
>> placed in the main loop after it ifconfigs the interface up?
>
>Interesting.   When I was writing my DHCP client script, I mentally
>edited that piece of the stock network setup code to do what you
>suggested.   I think you are correct, and this should go in the
>ifconfig loop, although I'm unsure how to implement it given the
>format of the $ifconfig_xxx variables and the /etc/ifconfig.xxx file.

seems to me it should be pretty easy.  at *some* point of the loop
it decided what the address is for the given interface.  save this
for later (ie, after you've actually done the ifconfig) and then
add the route.

example (from my 1.2 netstart)

   read af name mask bcaddr extras
   read dt dtaddr 

  if [ ! -n "$name" ]; then
      echo "/etc/hostname.$1: invalid network configuration file"
      exit
  fi
  ...
  $cmd
  route add $name localhost

of course, this would work better if $name was actually the address,
instead of the name.  but then again, who in their right mind would
ifconfig an interface to a name that had multiple addresses.  sounds
like a crap shoot to me...

-- 
|-----< "CODE WARRIOR" >-----|
andrew@echonyc.com (TheMan)        * "ah!  i see you have the internet
codewarrior@daemon.org                               that goes *ping*!"
warfare@graffiti.com      * "information is power -- share the wealth."