Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 2006 09:55:54 +1000
From:      "Murray Taylor" <MTaylor@bytecraft.com.au>
To:        "Lowell Gilbert" <freebsd-questions-local@be-well.ilk.org>
Cc:        freebsd-questions@freebsd.org
Subject:   RE: Getting DHCP to use resolv.conf? AN ANSWER
Message-ID:  <04E232FDCD9FBE43857F7066CAD3C0F111B0FD@svmailmel.bytecraft.internal>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------_=_NextPart_001_01C66CB1.A563F3A9
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

> -----Original Message-----
> From: owner-freebsd-questions@freebsd.org=20
> [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of=20
> Lowell Gilbert
> Sent: Friday, 28 April 2006 11:09 PM
> To: fbsd@a1poweruser.com
> Cc: freebsd-questions@freebsd.org
> Subject: Re: Getting DHCP to use resolv.conf?
>=20
> "fbsd" <fbsd@a1poweruser.com> writes:
>=20
> > Does anyone have a script that does this, that they can share?
>=20
> It will be pretty similar to the script I posted recently for=20
> updating your local named's forwarders list automatically. =20
> [Which is another approach to the same problem, and will=20
> generally perform better.]
>=20
> >=20
> > -----Original Message-----
> > From: owner-freebsd-questions@freebsd.org
> > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Bill Moran
> > Sent: Wednesday, April 26, 2006 5:06 PM
> > To: Telting
> > Cc: freebsd-questions@freebsd.org
> > Subject: Re: Getting DHCP to use resolv.conf?
> >=20
> >=20
> > On Wed, 26 Apr 2006 13:56:57 -0700
> > Telting <telting@comcast.net> wrote:
> >=20
> > > I would like to know how I can propagate the dns servers which the
> > dhcp
> > > client puts in resolv.conf to dhcpd.  I only see how I can only=20
> > > explicitly list a domain server with "option domain-name-servers".
> > How
> > > do I propogate non static dns servers?
> >=20
> > Write a script to updated the dhcpd.conf file when resolv.conf=20
> > changes.  dhclient allows you to create hooks that=20
> automagically run a=20
> > script of your choosing when a new lease is obtained.
> >=20
> > Or you could search the list archives for when this exact=20
> question was=20
> > asked a few weeks ago.
> >=20
> > --
> > Bill Moran
> > Collaborative Fusion Inc.
>=20


man dhclient-script

and my enter and exit scripts below from my home boxen


NB I use ddclient from ports to update dns stuff at dyndns.org and the
example.com should be replaced with your domain name in the enter-hooks
script.

These are not totally automatic in what they do, as I prefer to 'see and
know'
certain changes from my ISP so that is the reason for the email
setup....


Murray Taylor

Special Projects Engineer
Bytecraft Systems

P: +61 3 8710 2555
F: +61 3 8710 2599
D: +61 3 9238 4275
E: mtaylor@bytecraft.com.au=20

--
"Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction."
=20 Albert Einstein=20
--

=20

---------------------------------------------------------------
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material.=20

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---------------------------------------------------------------

***This Email has been scanned for Viruses by MailMarshal.***

------_=_NextPart_001_01C66CB1.A563F3A9
Content-Type: application/octet-stream;
	name="dhclient-enter-hooks"
Content-Transfer-Encoding: base64
Content-Description: dhclient-enter-hooks
Content-Disposition: attachment;
	filename="dhclient-enter-hooks"

IyEvYmluL3NoDQoNCiMgZXhwZWN0IGEgcmVhc29uDQoNCm1ha2VfcmVzb2x2X2NvbmYoKSB7DQoJ
aWYgWyB4IiRuZXdfZG9tYWluX25hbWVfc2VydmVycyIgIT0geCBdOyB0aGVuDQoJCWlmIFsgIngk
bmV3X2RvbWFpbl9uYW1lIiAhPSB4IF07IHRoZW4NCgkJCWVjaG8gc2VhcmNoIGV4YW1wbGUub3Jn
ICRuZXdfZG9tYWluX25hbWUgPiAvZXRjL3Jlc29sdi5jb25mDQoJCWVsc2UNCgkJCXJtIC9ldGMv
cmVzb2x2LmNvbmYNCgkJZmkNCgkJZWNobyBuYW1lc2VydmVyIDE5Mi4xNjguNDIuMSA+Pi9ldGMv
cmVzb2x2LmNvbmYNCgkJZm9yIG5hbWVzZXJ2ZXIgaW4gJG5ld19kb21haW5fbmFtZV9zZXJ2ZXJz
OyBkbw0KCQkJZWNobyBuYW1lc2VydmVyICRuYW1lc2VydmVyID4+L2V0Yy9yZXNvbHYuY29uZg0K
CQlkb25lDQoJZmkNCn0NCg0KY2FzZSAkcmVhc29uIGluDQoJTUVESVVNKQ0KCQk7Ow0KCVBSRUlO
SVQpDQoJCTs7DQoJQk9VTkQpDQoJCTs7DQoJUkVORVcpDQoJCTs7DQoJUkVCSU5EKQ0KCQk7Ow0K
CVJFQk9PVCkNCgkJOzsNCglFWFBJUkUpDQoJCTs7DQoJRkFJTCkNCgkJOzsNCglUSU1FT1VUKQ0K
CQk7Ow0KZXNhYw0KDQpsb2dnZXIgImRoY2xpZW50LWVudHJ5LWhvb2tzIC0gZ290ICRyZWFzb24i
DQo=

------_=_NextPart_001_01C66CB1.A563F3A9
Content-Type: application/octet-stream;
	name="dhclient-exit-hooks"
Content-Transfer-Encoding: base64
Content-Description: dhclient-exit-hooks
Content-Disposition: attachment;
	filename="dhclient-exit-hooks"

IyEvYmluL3NoDQpQQVRIPS91c3IvbG9jYWwvc2Jpbjoke1BBVEh9DQoNCnJ1bl9kZGNsaWVudCgp
IHsNCg0KCWNhc2UgIiRuZXdfaXBfYWRkcmVzcyIgaW4NCgkxMC4qKSAgIAk7Ow0KCTE3Mi4xWzYt
OV0uKiB8IDE3Mi4yWzAtOV0uKiB8IDE3Mi4zWzAtMV0uKikJOzsNCgkxOTIuMTY4LiopCTs7DQoJ
KikNCgkJbG9nZ2VyIC10IGRoY2xpZW50IElQIGFkZHJlc3MgY2hhbmdlZCB0byAkbmV3X2lwX2Fk
ZHJlc3MNCgkJZGRjbGllbnQgLXZlcmJvc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k5ldyBEb21haW46ICAgICAgJG5ld19kb21haW5fbmFtZQ0KTmV3IEROUzogICAgICAg
ICAkbmV3X2RvbWFpbl9uYW1lX3NlcnZlcnMNCg0KUHJvYmFibHkgbmVlZCB0byBsb29rIGF0IGZp
cmV3YWxsIHNjcmlwdHMgIQ0KQW5kIHN0b3AgLyBzdGFydCBudHBkIGlmIHRoZSBJUCBudW1iZXIg
aGFzIGFjdHVhbGx5IGNoYW5nZWQuDQpFT0YNCmZpDQoNCg==

------_=_NextPart_001_01C66CB1.A563F3A9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?04E232FDCD9FBE43857F7066CAD3C0F111B0FD>