summaryrefslogtreecommitdiff
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-09-03 15:09:00 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-03 10:24:20 +0100
commitcb7e692ec895ff9c15966faf29c9a84c0e78cdf5 (patch)
tree8460c30b55cca47ab0a73425d78cefd60b730935 /meta/recipes-core
parentb52c028252270c7bddc71554089fb184e52c5870 (diff)
downloadopenembedded-core-cb7e692ec895ff9c15966faf29c9a84c0e78cdf5.tar.gz
openembedded-core-cb7e692ec895ff9c15966faf29c9a84c0e78cdf5.tar.bz2
openembedded-core-cb7e692ec895ff9c15966faf29c9a84c0e78cdf5.zip
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd_216.bb12
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 () {