"ifconfig -vlandev" syntax

Brooks Davis brooks at one-eyed-alien.net
Thu Sep 29 16:15:38 PDT 2005

On Thu, Sep 29, 2005 at 06:23:10PM +0200, Fredrik Lindberg wrote:
> Yar Tikhiy wrote:
> >On Sun, Sep 25, 2005 at 02:37:41PM -0700, Brooks Davis wrote:
> >
> >>On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote:
> >>
> >>>As our ifconfig(8) is growing more options for special interface
> >>>types, inconsistencies sneak into their syntax.  In particular,
> >>>-vlandev takes a useless argument (vlan(4) cannot attach to more
> >>>than one parent anyway) while, e.g., -carpdev doesn't need one.
> >>>Personally, I like the latter since having to type unneeded words
> >>>on the command line annoys me.  Do you think that making -vlandev
> >>>need no arguments in CURRENT would break many existing things?
> >>
> >>I agree the argument is useless.  Unfortunatly, it's going to be hard to
> >>deprecate the old syntax so we may need to keep it around.
> >
> >
> >Alas, there doesn't seem to exist an easy way to support both
> >syntaxes in the ifconfig(8) parameter parser.  Perhaps we can
> >survive the pain of syntax change in CURRENT only, with a
> >heads-up message sent, release notes updated, etc?  I wonder
> >if many people use "ifconfig -vlandev XXX" in automated tools.
> >
> Why not use something simple such as the following (maybe even
> without that printf().
> root at genesis> ./ifconfig vlan0 create
> root at genesis> ./ifconfig vlan0 vlan 1 vlandev em0
> root at genesis> ./ifconfig vlan0 -vlandev
> root at genesis> ./ifconfig vlan0 vlan 1 vlandev em0
> root at genesis> ./ifconfig vlan0 -vlandev em0
> Passing interface to -vlandev is deprecated.

Excellent, this is the perfect solution.  Let's get something like this
committed and MFC'd so it goes out in 6.0.

-- Brooks

Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050929/7a0bb070/attachment.bin

More information about the freebsd-current mailing list