Find the answer to your Linux question:
Results 1 to 9 of 9
How to prevent resolv.conf to be overwritten by dhclient ? Greetz...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2004
    Posts
    23

    resolv.conf +dhclient


    How to prevent resolv.conf to be overwritten by dhclient ?

    Greetz

  2. #2
    Linux Newbie ihayhurst's Avatar
    Join Date
    Jun 2005
    Location
    UK
    Posts
    138
    according to the manpage for dhcpcd at least , calling it with the -R switch prevents resolv.conf from being toasted
    Registerd Linux user #119296

  3. #3
    Just Joined!
    Join Date
    Apr 2004
    Posts
    23
    Since I'm TERRIBLE new at this... is it possible to give a li'l more info on where excactly to specifiy this parameter?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie ihayhurst's Avatar
    Join Date
    Jun 2005
    Location
    UK
    Posts
    138
    well I'm sure it will be different in every distro, so I changed in to /etc
    ran the following find
    Code:
    find . |xargs -i grep -l dhcpcd {}
    one of the hits was/etc/sysconfig/network/dhcp

    That contained lots of goodies and comments about not bowing away resolv.conf with either dhcpcd or dhclient
    Registerd Linux user #119296

  6. #5
    Just Joined!
    Join Date
    Apr 2004
    Posts
    23
    still a little stuck here....

    ran the command
    output:

    ./selinux/targeted/contexts/files/file_contexts
    ./selinux/targeted/policy/policy.19
    ./log.d/scripts/services/dhcpd.conf
    ./log.d/conf/services/dhcpd.conf

    ......

  7. #6
    Linux Newbie ihayhurst's Avatar
    Join Date
    Jun 2005
    Location
    UK
    Posts
    138
    the command was basically to scan the contents of files below the etc dir for the word dhcpcd (you could use dhclient here as that seems to be what you've got) to find where it's called in the process of starting a network interface, as this seems to be highly distro sensitive....
    Registerd Linux user #119296

  8. #7
    Just Joined!
    Join Date
    Apr 2004
    Posts
    23
    Well I've fixed it!
    resolv.conf stays the way it should be.

    Tnx

  9. #8
    Linux Newbie ihayhurst's Avatar
    Join Date
    Jun 2005
    Location
    UK
    Posts
    138
    and the resolution (no pun intended) was.... (for the archives)
    Registerd Linux user #119296

  10. #9
    Just Joined!
    Join Date
    Apr 2004
    Posts
    23
    It was that simple that I even looked over it myself:

    - Started the X window manager
    - Open network configuration (same as the ifconfig)
    - Unchecked the checkbox "UPDATE DNS VIA DHCP" (or something similar to that) on my eth0 interface
    - Saved configuration
    - Restarted networking

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •