Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Oct 2000 14:30:34 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Ruslan Ermilov <ru@sunbay.com>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/21695: ifconfig_XXX_aliasY in rc.conf; Y must be in sequential order
Message-ID:  <20001002143034.A2489@ringwraith.office1.bg>
In-Reply-To: <200010021120.EAA33001@freefall.freebsd.org>; from ru@sunbay.com on Mon, Oct 02, 2000 at 04:20:03AM -0700
References:  <200010021120.EAA33001@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 02, 2000 at 04:20:03AM -0700, Ruslan Ermilov wrote:
>  >  > > Put the following in rc.conf:
>  >  > > 
>  >  > > ifconfig_fxp0="inet x.y.129.194 netmask 255.255.255.240"
>  >  > > ifconfig_fxp0_alias0="inet x.y.129.195 netmask 255.255.255.255"
>  >  > > #ifconfig_fxp0_alias1="inet x.y.129.196 netmask 255.255.255.255"
>  >  > > ifconfig_fxp0_alias2="inet x.y.129.198 netmask 255.255.255.255"
>  >  > > 
>  >  > > alias2 will not be configured.
>  >  > > 
>  >  > 
>  >  > Is this a problem or just something you noticed?  This behaviour is 
>  >  > documented in rc.conf(5).
>  >  
>  >  Well, both. :-)
>  >  
>  >  Actually I hadn't noticed there was a man page about rc.conf earlier, so I
>  >  just noticed it now.
>  >  
>  >  Nevertheless, even though it's documented, this would seem to be like a
>  >  thing that should just plain work :-)
>  >   
>  Hmm, how would you expect it to work?  rc.network scanning all possible
>  ifconfig_<iface>_alias<n>, where n is from 0 to infinity?  I doubt this
>  would be practical.

Theoretically, it could be done with some form of
`set | grep '^ifconfig_.*_alias'` .. however, grep is in /usr/bin, which
presents a bit of trouble with using it before configuring the network
interfaces :)  Hmm any way to do it in pure /bin/sh scripting?  /bin/ed
comes to mind, but creating a temporary file, ed'ing it, then sourcing
the result... rrrrgggggg... did I hear someone whisper 'race condition'
from the back rows? :P  Not to mention 'ugly' :(

G'luck,
Peter

-- 
This sentence contains exactly threee erors.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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