diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-09-03 15:09:00 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-03 11:09:04 +0100 |
commit | 16de99b14ad5a383f90df749260dd445b132906d (patch) | |
tree | 13725aa5bd4bff6ad27301b07909957fe94c981e /meta/recipes-core | |
parent | 2189b7e7d7bdd8eaa6e1c92376b3c5f5cccc71d7 (diff) | |
download | poky-16de99b14ad5a383f90df749260dd445b132906d.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.
(From OE-Core rev: cb7e692ec895ff9c15966faf29c9a84c0e78cdf5)
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.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() { | |||
130 | 130 | ||
131 | # Delete journal README, as log can be symlinked inside volatile. | 131 | # Delete journal README, as log can be symlinked inside volatile. |
132 | rm -f ${D}/${localstatedir}/log/README | 132 | rm -f ${D}/${localstatedir}/log/README |
133 | |||
134 | # Create symlinks for systemd-update-utmp-runlevel.service | ||
135 | install -d ${D}${systemd_unitdir}/system/graphical.target.wants | ||
136 | install -d ${D}${systemd_unitdir}/system/multi-user.target.wants | ||
137 | install -d ${D}${systemd_unitdir}/system/poweroff.target.wants | ||
138 | install -d ${D}${systemd_unitdir}/system/reboot.target.wants | ||
139 | install -d ${D}${systemd_unitdir}/system/rescue.target.wants | ||
140 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service | ||
141 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service | ||
142 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service | ||
143 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service | ||
144 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service | ||
133 | } | 145 | } |
134 | 146 | ||
135 | do_install_ptest () { | 147 | do_install_ptest () { |