protecting /etc/resolv.conf from being overwritten when ppp0 is dialed up [closed]

StackOverflow https://stackoverflow.com/questions/10807003

  •  11-06-2021
  •  | 
  •  

سؤال

I have an embedded system running a busybox distribution and for some reason i can't seem to find my dhclient.conf (http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5) that would let me "protect" resolv.conf wt but DHCP still works, how could that be? Also, is there another way to protect the nameservers in resolv.conf?

هل كانت مفيدة؟

المحلول 3

Just echoing my nameservers into /etc/resolv.conf after the dial up has been established....

نصائح أخرى

chattr +i /etc/resolv.conf

will help you ;)

That turns special attributes to protect the file for deletion or modification.

Creating a permission of this file.

chmod 0644 /etc/resolv.conf.

Owner can read and write. 6 Group can read. 4 Others can read. 4

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top