[TriLUG] find(1) vs locate(1) (was: Ignoring certain DHCP options (specifically, DNS))

Brian Henning bhenning at pineinst.com
Tue Feb 19 10:33:55 EST 2013


Brian,

I think Ken beat you to the punch supplying a sample dhclient.conf (thanks,
Ken!).  But:

Is find(1) more thorough than locate(1) (presuming a recent updatedb(8))?
On my system:

$ updatedb
$ locate dhclient.conf
/usr/share/doc/dhclient-3.0.5/dhclient.conf.sample
/usr/share/doc/dhcp-3.0.5/ja_JP.eucJP/dhclient.conf.5
/usr/share/man/man5/dhclient.conf.5.gz

Nothing but manpages and a sample (which isn't internally documented and is
a little Greek to me).

By comparison:
$ sudo find / -name dhclient.conf
[sudo] password for brian:
(many minutes later)
$

Anyway, I prefer locate(1), since it uses a static index and is orders of
magnitude faster than find(1), and also matches substrings by default.

Cheers,
~Brian

-----Original Message-----
From: trilug-bounces at trilug.org [mailto:trilug-bounces at trilug.org] On Behalf
Of Brian McCullough
Sent: Tuesday, February 19, 2013 10:14 AM
To: Triangle Linux Users Group General Discussion
Subject: Re: [TriLUG] Ignoring certain DHCP options (specifically, DNS)

On Tue, Feb 19, 2013 at 09:57:40AM -0500, Brian Henning wrote:
> Hi group,
> 
> So anyway, that's exactly what I want to do; I want to use 8.8.8.8 /
> 8.8.4.4.  Problem is, any time my public DHCP lease expires, dhclient
> rewrites my resolv.conf with the DNS option from the new DHCP lease,
> pointing me back to TWC's servers.
> 
> I've done some searching and I see references to modifying dhclient.conf,
> but my system (CentOS 5.8) doesn't have one (so apparently dhclient is
> operating completely on defaults?).

Are you sure that it isn't in some odd location?  ( find / -name
dhclient.conf )

I have two different files located in /etc/dhcp3 and /etc/dhcp.


Do you have all of the relevant packages installed?

I have dhcp3-client, dhcp3-common, isc-dhcp-client and isc-dhcp-common.
( Debian world )


If necessary, I could send you mine from /etc/dhcp, which is probably
the one that you are looking for.  It also has the modification for
8.8.8.8, etc.


Brian


-- 
This message was sent to: Brian <bhenning at pineinst.com>
To unsubscribe, send a blank message to trilug-leave at trilug.org from that
address.
TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
Unsubscribe or edit options on the web	:
http://www.trilug.org/mailman/options/trilug/bhenning%40pineinst.com
TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions





More information about the TriLUG mailing list