Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 1996 09:07:14 -0500 (CDT)
From:      Joe Greco <jgreco@brasil.moneng.mei.com>
To:        garya@ics.com (Gary Aitken)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: netstart & network interface startup scripts
Message-ID:  <199605101407.JAA02357@brasil.moneng.mei.com>
In-Reply-To: <318F9F04.1388@ics.com> from "Gary Aitken" at May 7, 96 01:05:40 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> In 2.1, /etc/netstart contains the following code to configure the
> network interfaces:
> 
> # Set up all the network interfaces, calling startup scripts if needed
> for ifn in ${network_interfaces}; do
>         if [ -e /etc/start_if.${ifn} ]; then
>                 . /etc/start_if.${ifn} ${ifn}
>         fi
>         eval ifconfig_args=\$ifconfig_${ifn}
>         ifconfig ${ifn} ${ifconfig_args}
>         ifconfig ${ifn}
> done
> 
> Why are the interface specific scripts run *before* the interfaces
> are actually configured?  I would have thought they should be run
> afterwards.  
> 
> for example, I need to do the following at startup:
> 
> ifconfig de0 inet 206.230.42.65 netmask 255.255.255.224
> ifconfig de0 inet 206.230.42.69 alias
> 
> The first can be taken care of with the normal ifconfig_de0="..."
> line in sysconfig.  The second could be done by supplying
> an /etc/start_if.de0 script, but in that case both lines
> would need to be put there and no ifconfig_de0 line would
> be in sysconfig (which makes the comments in sysconfig a
> bit misleading).
> 
> Is the intent that the presence of /etc/start_if.xxx means
> there should be no ifconfig_xxx line in sysconfig?

Good question, this has been argued a few times and I think the last
consensus was that it should be an exclusive OR.

Credit Rod Grimes with suggesting the following clever bit which I haven't
actually tried:

ifconfig_ed0="inet 206.55.64.254 netmask 0xffffff80"
ifconfig_ed0="${ifconfig_ed0} alias 206.55.64.130 netmask 0xffffffff"
ifconfig_ed0="${ifconfig_ed0} alias 206.55.64.131 netmask 0xffffffff"
etc

... Joe

-------------------------------------------------------------------------------
Joe Greco - Systems Administrator			      jgreco@ns.sol.net
Solaria Public Access UNIX - Milwaukee, WI			   414/546-7968



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605101407.JAA02357>