I have 2 different embedded devices...an old one running TI arago Linux and a Xilinx device (petalinux).
On both I see the same outcome when adding
/etc/network/interfaces and reconfiguring the network with
/etc/init.d/networking restart or rebooting the device:
/etc/resolv.conf file always stays empty.
network-manager daemon or
mdns are present in the system.
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1
[root@linux:~] ls -l /etc/resolv.conf lrwxrwxrwx 1 root root 20 Feb 3 18:17 /etc/resolv.conf -> /var/run/resolv.conf [root@linux:~] ls -l /var/run/resolv.conf -rw-r--r-- 1 root root 0 Feb 3 18:17 /var/run/resolv.conf
/etc/init.d/networking restart, both devices call basically
ifdown -a and then
ifup -a, being both
ifdown busybox utilities in this case.
In case mentioning the immutable file attributes solution: I don't want to generate manually the
resolv.conf file and change the file attributes to make it immutable (
chattr +i), because it seems completely against how the system was designed. Why is then
resolv.conf stored in volatile memory (generated by populate-volatile.sh) in the first place, if it should be permanent?
Thanks for any hints!
Update: found the solution, but will leave the question, for the sake of somebody searching for it.