/etc/resolv.conf symlink

Anders Montonen


I'm hoping someone could clarify how the symlink generation from /etc/resolv.conf to systemd's runtime /run/systemd/resolve/resolv.conf is supposed to work when resolved is not enabled.

In the systemd do_install(), a directive for generating this symlink is inserted into /usr/lib/tmpfiles.d/etc.conf:

if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf

However, systemd also pulls in volatile-binds, which installs an override for etc.conf pointing to /dev/null, thereby preventing this link from being created:

# Suppress attempts to process some tmpfiles that are not temporary.
install -d ${D}${sysconfdir}/tmpfiles.d ${D}/var/cache
ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/etc.conf
ln -s /dev/null ${D}${sysconfdir}/tmpfiles.d/home.conf

Have I understood this correctly, and is this supposed to work?


Join yocto@lists.yoctoproject.org to automatically receive all group messages.