Patch to prevent multiple dhclients starting on an interface
David W. Hankins
David_Hankins at isc.org
Wed Jun 15 19:49:45 UTC 2005
On Wed, Jun 15, 2005 at 12:28:23PM -0700, Ted Lemon wrote:
> On Jun 15, 2005, at 11:59 AM, David W. Hankins wrote:
> > But is there a walkthrough setting dhclient control object state?
>
> Yes, in the dhclient man page.
THE CONTROL OBJECT
The control object allows you to shut the client down, releasing all
leases that it holds and deleting any DNS records it may have added.
It also allows you to pause the client - this unconfigures any inter-
faces the client is using. You can then restart it, which causes it
to reconfigure those interfaces. You would normally pause the client
prior to going into hibernation or sleep on a laptop computer. You
would then resume it after the power comes back. This allows PC cards
to be shut down while the computer is hibernating or sleeping, and then
reinitialized to their previous state once the computer comes out of
hibernation or sleep.
The control object has one attribute - the state attribute. To shut
the client down, set its state attribute to 2. It will automatically
do a DHCPRELEASE. To pause it, set its state attribute to 3. To
resume it, set its state attribute to 4.
It tells you what to set - it's not what I'd call an example or a
walkthrough though.
Oh, and now that I look, I notice this:
client not to exit when it doesn't find any such interfaces. The
omshell (8) program can then be used to notify the client when a net-
work interface has been added or removed, so that the client can
attempt to configure an IP address on that interface.
So it appears I mis-spoke earlier, but I couldn't tell you how that
works.
> OMAPI is evil. Evil, I tell you. Having said that, I'd originally
> intended to support unix domain sockets, and I think it should be
> pretty straightforward.
That may be, but it's become a necessary evil - it's being used
widely.
I'd love for there to be an alternative that was not, or was at least
less evil.
--
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-hackers
mailing list