I'm trying to setup a Yocto build using NetworkManager v1.22.16 and
systemd 244.5. 
https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html#/etc/resolv.conf
recommends I setup /etc/resolv.conf as a symbolic link to
/var/run/systemd/resolve/stub-resolv.conf. Initially it was linked to
/etc/resolv-conf.NetworkManager but I've fixed that by adding a
networkmanager_%.bbappend file with:

    ALTERNATIVE_${PN} = ""

But now I find /etc/resolv.conf is a symbolic link to
/etc/resolv-conf.systemd, which is itself a symbolic link to
/run/systemd/resolve/resolv.conf. This seems to come from
systemd_244.5.bb:
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd_244.5.bb?h=dunfell#n289

    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
        echo 'd /run/systemd/resolve 0755 root root -'
>>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
        echo 'f /run/systemd/resolve/resolv.conf 0644 root root'
>>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
        ln -s ../run/systemd/resolve/resolv.conf
${D}${sysconfdir}/resolv-conf.systemd
    else
        sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - -
- ../run/systemd/resolve/resolv.conf%g"
${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
        ln -s ../run/systemd/resolve/resolv.conf
${D}${sysconfdir}/resolv-conf.systemd
    fi

But there doesn't seem to be any support for making /etc/resolv.conf a
symbolic link to /var/run/systemd/resolve/stub-resolv.conf. Is there
any way of doing this that I'm missing or is this functionality just
missing?

(Apologies if this is the wrong forum for this, I'm relatively new to
Yocto and systemd).

Thanks.

-- 
Tom Isaacson
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#59591): https://lists.yoctoproject.org/g/yocto/message/59591
Mute This Topic: https://lists.yoctoproject.org/mt/98022296/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to