How can I prevent NetworkManager to overwrite /etc/resolv.conf in no-dhcp wired networks?



I use NetworkManager 0.6.6 to connect to wired and wireless networks
and it works as expected when there is DHCP available. The problems
appears when I connect to a network which requires a static
configuration (no DHCP). Whenever I connect to a wired network wichout
DHCP my /etc/resolv.conf is overwitten by NetworkManager with the next
content:
### BEGIN INFO
#
# Modified_by:  NetworkManager
# Process:      /usr/bin/NetworkManager
# Process_id:   4393
#
### END INFO

As seen,  there are some comments but no nameserver entry so this
resolv.conf is unusable.

I want to know if there is a way to prevent NetworkManager from
overwriting my /etc/resolv.conf if there is no DHCP server available.
I use to connect to several wired networks wich have no DHCP server so
it's a pain having to set the DNS manually. I think the default
behavior if no there is no DHCP response should be to keep the current
resolv.conf. Of course I can use some kind of script to do the job but
I would like if there is another solution in the NetworkManager's way.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]