diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-08-29 02:29:17 -0400 |
---|---|---|
committer | Chen Qi <Qi.Chen@windriver.com> | 2014-09-03 15:05:41 +0800 |
commit | 82768c5d4661c6b968910284cc173e3eda02c48c (patch) | |
tree | b8483f8c779008cead23310c1e558c90da398257 /meta/recipes-core | |
parent | 650faa1e6d42990182570c9c7e45b35891c94001 (diff) | |
download | openembedded-core-contrib-82768c5d4661c6b968910284cc173e3eda02c48c.tar.gz |
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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/systemd/systemd_216.bb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb index f88a9a9e90..28456dd325 100644 --- a/meta/recipes-core/systemd/systemd_216.bb +++ b/meta/recipes-core/systemd/systemd_216.bb @@ -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 () { |