Skip to main content
Post Closed as "Duplicate" by Kusalananda, Archemar, jesse_b, elbarna, meuh
[Edit removed during grace period]
Source Link
Dave
  • 275
  • 7
  • 21
Source Link
Dave
  • 275
  • 7
  • 21

Why is my resolv.conf being deleted?

I've built a custom linux system using Yocto. It uses busybox. I have most everything working, except I can't have a static dns resolver address because /etc/resolv.conf is being deleted on every boot, and replaced with a link to /var/run/resolv.conf.

I think this is being caused by a script called /etc/volatile.cache. I've deleted this script, but I think another script /etc/init.d/populate-volatile.sh recreates it every time.

Certainly I could add my own script, something like /etc/rc5.d/S90set-resolv that writes a value to resolv.conf, but that seems like an extremely strange way to do it.

Does anybody know what is going on here? What is the correct way to set a nameserver address in this situation?