Patchwork [2/2] systemd: link runlevel from systemctl

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Sept. 4, 2013, 6:56 a.m.
Message ID <be19ea6551721c03fca8679acbf05053f3cebfd6.1378276893.git.rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/57327/
State Accepted
Commit 8909b3b71b2ac792ae092b8f0a6c2ade28f6b73b
Headers show

Comments

rongqing.li@windriver.com - Sept. 4, 2013, 6:56 a.m.
From: "Roy.Li" <rongqing.li@windriver.com>

using update-alternatives to link runlevel from systemctl, as on Fedora 18

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 meta/recipes-core/systemd/systemd_206.bb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/systemd/systemd_206.bb b/meta/recipes-core/systemd/systemd_206.bb
index 75bdc61..519d50f 100644
--- a/meta/recipes-core/systemd/systemd_206.bb
+++ b/meta/recipes-core/systemd/systemd_206.bb
@@ -253,7 +253,7 @@  python __anonymous() {
 # TODO:
 # u-a for runlevel and telinit
 
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff"
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
 
 ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
 ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -275,6 +275,10 @@  ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
 ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
 ALTERNATIVE_PRIORITY[poweroff] ?= "300"
 
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
 pkg_postinst_udev-hwdb () {
 	if test -n "$D"; then
 		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \