From owner-freebsd-hackers Fri May 10 07:08:10 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA19277 for hackers-outgoing; Fri, 10 May 1996 07:08:10 -0700 (PDT) Received: from brasil.moneng.mei.com (brasil.moneng.mei.com [151.186.109.160]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id HAA19272 for ; Fri, 10 May 1996 07:08:06 -0700 (PDT) Received: (from jgreco@localhost) by brasil.moneng.mei.com (8.7.Beta.1/8.7.Beta.1) id JAA02357; Fri, 10 May 1996 09:07:15 -0500 From: Joe Greco Message-Id: <199605101407.JAA02357@brasil.moneng.mei.com> Subject: Re: netstart & network interface startup scripts To: garya@ics.com (Gary Aitken) Date: Fri, 10 May 1996 09:07:14 -0500 (CDT) Cc: freebsd-hackers@freebsd.org In-Reply-To: <318F9F04.1388@ics.com> from "Gary Aitken" at May 7, 96 01:05:40 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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