dhclient raw socket?
David W. Hankins
David_Hankins at isc.org
Fri Jan 26 17:24:53 UTC 2007
On Fri, Jan 26, 2007 at 10:57:33AM -0500, Schmidt, Jolynn wrote:
> I have my new dhclient-script written and I have recompiled the kernel
> but want to make sure all of the parts are correct. Once I have enabled
> netfilters I have various other options that are available. Do I need
> any of these? I have an embedded system so keeping the kernel small is
> important. Can I get away with just netfilter?
>
> > CONFIG_NETFILTER=y
Our README says CONFIG_PACKET and CONFIG_FILTER. I think
CONFIG_FILTER went away. I don't think any of the NETFILTER
suboptions are necc'y (at least they're built as modules on my
machine, isc dhcp is running, and none of them are loaded).
> When looking at the dhclient-script used by Fedora it sources files and
> uses outside functions so it was hard for me to trace down where the [
Oh, well, sure, you could /make/ it complicated if you really tried!
> x$var = x ] syntax comes from since I had never seen it before. I never
This is a shell scripting convention. "if [ $var = foo ]" fails with
a shell-level error in some shells where $var is empty (the parser
tries to read this as "if [ = foo ]"). So "x$foo = xbar" is
the canonical way to deal with this and all other edge cases.
I believe the linux dhclient-script started as a copy of one of the
bourne (not again) shell versions, and then developed some aspects
that relied on bash (I remember changing it to #!/bin/bash) through
submitted patches.
So if you're using the package's script as a starting point, and
not using bash in your initrd, you might want to look carefully
to make sure it's all bourne (not again) shell syntax.
--
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins
More information about the dhcp-users
mailing list