LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How can I avoid network manager from modifying resolv.conf? (http://www.linuxquestions.org/questions/linux-networking-3/how-can-i-avoid-network-manager-from-modifying-resolv-conf-641259/)

algogeek 05-10-2008 05:58 AM

How can I avoid network manager from modifying resolv.conf?
 
Hi,
I want to keep opendns servers in my nameserver list, and I want to know how I can avoid network manager from modifying my resolv.conf after each time it connects to a different network. system-config-network doesn't work since it seems like network manager sets its own policies.

Can anyone advise? I'm on fedora 8.

aus9 05-10-2008 07:01 PM

until you get a better answer use a work around.

create a text file with your correct nameserver details and call it
resolve-new

2) create a script inside rc.local that replaces resolve.conf with resolve-new with a name change of course.

something like

mv -f /etc/resolve-new /etc/resolve.conf && chmod 600 /etc/resolve.conf

pronoy 05-12-2008 02:28 AM

1. Create the file /etc/dhclient-enter-hooks that contains the following function

make_resolv_conf() {
echo "Do nothing"
}

2. chmod 644 /etc/dhclient-enter-hooks


All times are GMT -5. The time now is 06:31 AM.