Date: Sat, 21 Jan 2006 19:06:43 -0500 From: Parv <parv@pair.com> To: Dick Davies <rasputnik@gmail.com> Cc: f-q <freebsd-questions@freebsd.org> Subject: Re: Syntax of dhclient.conf(5) Message-ID: <20060122000643.GA1003@holestein.holy.cow> In-Reply-To: <3f1760601130150n586b0b2dr@mail.gmail.com> References: <20060113052959.GA15340@holestein.holy.cow> <3f1760601130150n586b0b2dr@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
in message <3f1760601130150n586b0b2dr@mail.gmail.com>, wrote Dick Davies thusly... > > There should be semicolons after each line. > > On 13/01/06, Parv <parv@pair.com> wrote: > > I failed to find detailed syntax layout in dhclient.conf(5) man page, > > via web search, or be able to deduce from files in > > /misc/src/sbin/dhclient. I was looking for something like as given in > > (i)pf.conf(5) man pages. > > > > Could somebody point me to a detailed document documenting the syntax? > > Alternatively, please help me understand what am i missing from the > > dhclient.conf listed below which results in following parsing error > > messages ... > > > > /etc/dhclient.conf line 11: expecting identifier after option keyword. > > { > > ^ > > /etc/dhclient.conf line 18: expecting a statement. > > } > > ^ > > /etc/dhclient.conf line 32: semicolon expected. > > > > ^ > > > > ... dhclient.conf ... > > > > 1 > > 2 # FreeBSD 6.0-STABLE's dhclient empties /etc/resolv.conf & default route is > > 3 # not being assigned. Remedy this by having sane entries here in dhclient.conf. > > 4 > > 5 request subnet-mask , routers , domain-name-servers; > > 6 require routers , domain-name-servers; > > 7 > > 8 interface "em0" > > 9 { > > 10 default > > 11 { > > 12 fixed-address 192.168.2.100 > > 13 , option subnet-mask 0xffffff00 > > 14 , option routers 192.168.2.1 > > 15 } > > (if you're setting all these yourself, why are you bothering to > do dhcp on that interface?) I was/am having problems wrt iwi0 interface getting a IP address and default route. So, in this case, I was/am using em0 interface for practice. Let me add that i do not have any problems in using em0 w/ DHCP w/o any /etc/dhclient.conf. > There should be semicolons after each line in the braces, I did try, still having same exact error message being produced. > and the leading dots before option aren't something I recognize. Seems like problem w/ your font; that "leading dot" is actually a comma. In case you will be inclined to suggest to move comma from being in front of a line to the end of the previous line, i have already tried that too, still resulting in the same error message. Also from dhclient.conf(5) man page ... DESCRIPTION ... The dhclient.conf file is a free-form ASCII text file. It is parsed by the recursive-descent parser built into dhclient(8). The file may contain extra tabs and newlines for formatting purposes. ... OPTION MODIFIERS ... default { [option declaration] [, ... option declaration] } If for some set of options the client should use the value sup- plied by the server, but needs to use some default value if no value was supplied by the server, these values can be defined in the default statement. - Parv --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060122000643.GA1003>