mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 09:32:17 +02:00
systemd: make runlevel work in non-runlevel targets
Previously, after booting into the targets like multi-user.target or graphical.target, the output of `runlevel' command is 'unknown'. This is confusing for users. Normally, we would expect mutli-user.target would have a `runlevel' output of 'N 3'. This is the behaviour of Fedora20. This patch installs symlinks for systemd-update-utmp-runlevel.service in do_install task to fix the above problem. (From OE-Core rev: cb7e692ec895ff9c15966faf29c9a84c0e78cdf5) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -130,6 +130,18 @@ do_install() {
|
||||
|
||||
# Delete journal README, as log can be symlinked inside volatile.
|
||||
rm -f ${D}/${localstatedir}/log/README
|
||||
|
||||
# Create symlinks for systemd-update-utmp-runlevel.service
|
||||
install -d ${D}${systemd_unitdir}/system/graphical.target.wants
|
||||
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
|
||||
install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
|
||||
install -d ${D}${systemd_unitdir}/system/reboot.target.wants
|
||||
install -d ${D}${systemd_unitdir}/system/rescue.target.wants
|
||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
|
||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
|
||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
|
||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
|
||||
ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
|
||||
}
|
||||
|
||||
do_install_ptest () {
|
||||
|
||||
Reference in New Issue
Block a user