mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
systemd: fix broken links for sysvinit-compatible commands
Since commit[1], PACKAGECONFIG[sysvinit] is not enabled by default when sysvinit is not in DISTRO_FEATURES, which causes the following sysvinit-compatible commands/services to not be built and installed: runlevel telinit rc-local.service systemd-initctl systemd-initctl.service systemd-rc-local-generator systemd-sysv-generator systemd-update-utmp-runlevel.service Therefore, links to these commands/services should only be created when PACKAGECONFIG[sysvinit] is enabled. [1] https://git.openembedded.org/openembedded-core/commit/?id=3668235fd60a9027608f37251c4b453ed21b3687 (From OE-Core rev: a20b698f1acdee972cf1ff570b09a2e2c36bef1a) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -339,7 +339,7 @@ do_install() {
|
|||||||
install -d ${D}${systemd_system_unitdir}/rescue.target.wants
|
install -d ${D}${systemd_system_unitdir}/rescue.target.wants
|
||||||
|
|
||||||
# Create symlinks for systemd-update-utmp-runlevel.service
|
# Create symlinks for systemd-update-utmp-runlevel.service
|
||||||
if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
|
if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)} && ${@bb.utils.contains('PACKAGECONFIG', 'sysvinit', 'true', 'false', d)}; then
|
||||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service
|
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service
|
||||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service
|
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service
|
||||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service
|
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service
|
||||||
@@ -841,7 +841,9 @@ python do_warn_musl() {
|
|||||||
}
|
}
|
||||||
addtask warn_musl before do_configure
|
addtask warn_musl before do_configure
|
||||||
|
|
||||||
ALTERNATIVE:${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
|
ALTERNATIVE:${PN} = "halt reboot shutdown poweroff \
|
||||||
|
${@bb.utils.contains('PACKAGECONFIG', 'sysvinit', 'runlevel', '', d)} \
|
||||||
|
${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}"
|
||||||
|
|
||||||
ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
|
ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd"
|
||||||
ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
|
ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user