mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
systemd: enable resolved and networkd
Enable systemd-resolved and systemd-networkd by default. Make it co-exist with connman and Fix associated problems in read-only rootfs. Fixes [YOCTO #11331] (From OE-Core rev: d9b6d538e3d81ab0d5e7b7b6adecef555d782217) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5db4d0dbbb
commit
00e4662e55
@@ -62,6 +62,8 @@ PACKAGECONFIG ??= "xz \
|
||||
firstboot \
|
||||
utmp \
|
||||
polkit \
|
||||
resolved \
|
||||
networkd \
|
||||
"
|
||||
PACKAGECONFIG_remove_libc-musl = "selinux"
|
||||
PACKAGECONFIG_remove_libc-musl = "smack"
|
||||
@@ -244,9 +246,10 @@ do_install() {
|
||||
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
|
||||
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
|
||||
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
|
||||
}
|
||||
@@ -451,7 +454,7 @@ FILES_${PN} = " ${base_bindir}/* \
|
||||
${sysconfdir}/tmpfiles.d/ \
|
||||
${sysconfdir}/xdg/ \
|
||||
${sysconfdir}/init.d/README \
|
||||
${sysconfdir}/resolv.conf \
|
||||
${sysconfdir}/resolv-conf.systemd \
|
||||
${rootlibexecdir}/systemd/* \
|
||||
${systemd_unitdir}/* \
|
||||
${base_libdir}/security/*.so \
|
||||
@@ -535,7 +538,7 @@ python __anonymous() {
|
||||
# TODO:
|
||||
# u-a for runlevel and telinit
|
||||
|
||||
ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
|
||||
ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel resolv-conf"
|
||||
|
||||
ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
|
||||
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
|
||||
@@ -561,6 +564,10 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
|
||||
ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
|
||||
ALTERNATIVE_PRIORITY[runlevel] ?= "300"
|
||||
|
||||
ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
|
||||
ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
|
||||
ALTERNATIVE_PRIORITY[resolv-conf] ?= "50"
|
||||
|
||||
pkg_postinst_${PN} () {
|
||||
sed -e '/^hosts:/s/\s*\<myhostname\>//' \
|
||||
-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
|
||||
|
||||
Reference in New Issue
Block a user