On Mon, Nov 26, 2012 at 04:26:12PM +0000, Jason McIntyre wrote: > On Mon, Nov 26, 2012 at 04:30:47PM +0200, Paul Irofti wrote: > > Be more specific about the order of interpretation. Okay? > > > > diff --git share/man/man5/hostname.if.5 share/man/man5/hostname.if.5 > > index b07459f..aa8446f 100644 > > --- share/man/man5/hostname.if.5 > > +++ share/man/man5/hostname.if.5 > > @@ -49,6 +49,8 @@ A configuration file is not needed for lo0. > > The configuration information is expressed in a line-by-line packed format > > which makes the most common cases simpler; those dense formats are > > described > > below. > > +The order of the configuration lines matters, they are interpreted from the > > +top down. > > Any lines not matching these packed formats are passed directly to > > .Xr ifconfig 8 . > > The packed formats are converted using a somewhat inflexible parser and > > > > if we say this, then we should provide guidance to folks about how to > order the lines. what is the specific problem, or the general rule, that > you are addressing? > > jmc >
I suggest the following. I think the dhcp example is likely a common use case that is obvious and clear. .... Ken Index: hostname.if.5 =================================================================== RCS file: /cvs/src/share/man/man5/hostname.if.5,v retrieving revision 1.56 diff -u -p -r1.56 hostname.if.5 --- hostname.if.5 8 Jul 2011 01:30:26 -0000 1.56 +++ hostname.if.5 26 Nov 2012 17:29:13 -0000 @@ -63,6 +63,17 @@ For example: .Bd -literal -offset indent inet 10.0.0.1 255.255.255.0 10.0.0.255 description "Bob's uplink" .Ed +.Pp +Each line is processed separately and in order. +For example: +.Bd -literal -offset indent +nwid mynwid +wpakey mywpakey +dhcp +.Ed +.Pp +would run ifconfig to set the nwid of the interface, run it again to set the wpakey of the interface, and then start +.Xr dhclient 8 . .Sh STATIC ADDRESS CONFIGURATION The following packed formats are valid for configuring network interfaces with static addresses: