From owner-freebsd-bugs Mon Oct 2 4:31: 2 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from sentinel.office1.bg (sentinel.office1.bg [195.24.48.182]) by hub.freebsd.org (Postfix) with SMTP id 03E4637B502 for ; Mon, 2 Oct 2000 04:30:56 -0700 (PDT) Received: (qmail 2602 invoked by uid 1001); 2 Oct 2000 11:30:34 -0000 Date: Mon, 2 Oct 2000 14:30:34 +0300 From: Peter Pentchev To: Ruslan Ermilov 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> References: <200010021120.EAA33001@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200010021120.EAA33001@freefall.freebsd.org>; from ru@sunbay.com on Mon, Oct 02, 2000 at 04:20:03AM -0700 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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__alias, 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