Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 20:49:53 +0400
From:      Yar Tikhiy <yar@comp.chem.msu.su>
To:        Dag-Erling Sm?rgrav <des@des.no>
Cc:        rc@freebsd.org
Subject:   Re: ifconfig_foo0 syntax
Message-ID:  <20051028164953.GD89861@comp.chem.msu.su>
In-Reply-To: <86ll0d4mtk.fsf@xps.des.no>
References:  <86ll0d4mtk.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 28, 2005 at 06:40:23PM +0200, Dag-Erling Sm?rgrav wrote:
> I've been having trouble with a bridge interface.  It seemed logical
> to me to do
> 
> cloned_interfaces="bridge0"
> ifconfig_bridge0="addm foo0 addm bar0 inet 10.0.0.1/24"
> 
> but ifconfig(8) does not accept "inet" after "addm".
> 
> (perhaps I should have put the inet bit at the front?)

Yes, the address should come first on the command line.
The only word that can precede the address is "create".
I myself played with bridge just yesterday using a line
similar to the following one:

ifconfig_bridge0="inet 10.0.0.1/24 addm foo0 addm bar0"

Similarly, vlan interfaces are to be brought up as follows:

ifconfig_vlan0="inet 10.0.0.1/24 vlan 10 vlandev baz0"

And so on.  The ifconfig(8) manpage seems to specify that.

ifconfig(8) should be clever enough to do the actual syscalls
in the proper order, and it is in all cases I've met :-)

> In any case, I came up with a patch that allows me to do
> 
> ifconfig_bridge0="addm foo0; addm bar0; inet 10.0.0.1/24"
> 
> which translates into three different ifconfig invocations.
> 
> there's probably a better / cleaner way to do this...

Do you agree now that there is no need to patch rc files?

-- 
Yar



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