The FreeBSD Diary

The FreeBSD Diary (TM) Remember
I remember
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 dhclient
Author: solis 
Date:   26-08-02 05:17

Ok, it is absolutely frivolous to post this, but perhaps someone may find it useful.

dhclient supports a number of hooks that control how the script interacts with the rest of the system, in this case, we wish to negate the adverse effects of rewriting /etc/resolv.conf everytime dhclient works it voodoo.

man dhclient-script for more info.

Anyways, create your resolv.conf then do this:


# vi /etc/dhclient-enter-hooks

make_resolv_conf() {
echo "doing nothing to resolv.conf"
}

# chmod 500 dhclient-enter-hooks
# chmod +x dhclient-enter-hooks
# killall dhclient
# dhclient interface

now you will notice that dhclient will reassuringly notify you that it is "doing nothing to resolv.conf".


And that's it!


Cheers!

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 dhclient   new
solis 26-08-02 05:17 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org