Static configuration: prevent /etc/resolv.conf from being overwritten on first reboot

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



Hi,

Here's something that's puzzling me.

Starting from a minimal installation of CentOS 7, network configuration is DHCP.

I'm launching nmtui to define a static configuration.

I'm providing the IP address as well as the gateway, but no DNS server.

I'm quitting nmtui and I'm editing /etc/resolv.conf to provide my DNS server:

# /etc/resolv.conf
nameserver 192.168.0.254

I reboot my server, and I don't know why, but my /etc/resolv.conf has been
overwritten:

# Generated by NetworkManager

So I edit this file again:

# /etc/resolv.conf
nameserver 192.168.0.254

And starting from here, it works, meaning /etc/resolv.conf is not overwritten
on subsequent reboots.

Q: how can I prevent /etc/resolv.conf from being overwritten on the initial
reboot? I vaguely remember having to kill some process before editing it, but
unfortunately I don't remember which one.

Cheers,

Niki
-- 
Microlinux - Solutions informatiques durables
7, place de l'église - 30730 Montpezat
Site : https://www.microlinux.fr
Blog : https://blog.microlinux.fr
Mail : info@xxxxxxxxxxxxx
Tél. : 04 66 63 10 32
Mob. : 06 51 80 12 12
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux