Skip to contentSkip to conversation

make runlevel to return correct value

PATCH In review [email protected] 2 participants 6 messages Sep 4, 2013 – Sep 12, 2013

lore
Share & tools
lore
#0 lore raw

cover make runlevel to return correct value

From: "Roy.Li" <[email protected]>

The following changes since commit 8c272641ef3e8410f331ca4133d28dea8f36e4f4:

lib/oeqa/runtime: smart: serve repo on host ip only and increase timeout (2013-09-03 19:57:31 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib roy/systemd-1
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/systemd-1

Roy.Li (2):
systemd-compat-units: do not create runlevel command
systemd: link runlevel from systemctl

 meta/recipes-core/systemd/systemd-compat-units.bb |    5 -----
 meta/recipes-core/systemd/systemd_206.bb          |    6 +++++-
 2 files changed, 5 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 systemd-compat-units: do not create runlevel command

From: "Roy.Li" <[email protected]>

It seems strange that runlevel always returns 1, we should create a runlevel link to systemctl if systemd is installed.

---
 meta/recipes-core/systemd/systemd-compat-units.bb |    5 -----
 1 file changed, 5 deletions(-)
meta/recipes-core/systemd/systemd-compat-units.bb +0 -5
index 9b4a8a4..c47c14b 100644
@@ -21,11 +21,6 @@ do_install() {
 	install -m 0644 ${WORKDIR}/machineid.service ${D}${systemd_unitdir}/system
 	ln -sf ../machineid.service ${D}${systemd_unitdir}/system/sysinit.target.wants/
 	ln -sf ../machineid.service ${D}${systemd_unitdir}/system/basic.target.wants/
-
-	# hack to make old style sysvinit postinsts succeed
-	install -d ${D}${bindir}
-	echo "echo 1" > ${D}${bindir}/runlevel
-	chmod 0755 ${D}${bindir}/runlevel
 }
 
 SYSTEMD_DISABLED_SYSV_SERVICES = " \
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH 1/2] systemd-compat-units: do not create runlevel command

Quoted 15 lines · On 09/04/2013 02:56 PM, [email protected] wrote:

From: "Roy.Li" <[email protected]>

It seems strange that runlevel always returns 1, we should create a runlevel link to systemctl if systemd is installed.

---
  meta/recipes-core/systemd/systemd-compat-units.bb |    5 -----
  1 file changed, 5 deletions(-)
meta/recipes-core/systemd/systemd-compat-units.bb +0 -0
index 9b4a8a4..c47c14b 100644

meta/recipes-core/systemd/systemd-compat-units.bb do_install() { · line 28

Quoted 8 lines
meta/recipes-core/systemd/systemd-compat-units.bb +0 -5
@@ -21,11 +21,6 @@ do_install() {
  	install -m 0644 ${WORKDIR}/machineid.service ${D}${systemd_unitdir}/system
  	ln -sf ../machineid.service ${D}${systemd_unitdir}/system/sysinit.target.wants/
  	ln -sf ../machineid.service ${D}${systemd_unitdir}/system/basic.target.wants/
-
-	# hack to make old style sysvinit postinsts succeed
-	install -d ${D}${bindir}
-	echo "echo 1" > ${D}${bindir}/runlevel
-	chmod 0755 ${D}${bindir}/runlevel

In fact, I am not sure what they are fixing, if these codes are still using, I will think other methods to make runlevel work

-Roy

Quoted 4 lines
meta/recipes-core/systemd/systemd-compat-units.bb +0 -0
  }
 
  SYSTEMD_DISABLED_SYSV_SERVICES = " \
Signature · 2 lines
Best Reagrds,
Roy | RongQing Li
#3 lore raw

PATCH 2/2 systemd: link runlevel from systemctl

In reply to [email protected]

From: "Roy.Li" <[email protected]>

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

---
 meta/recipes-core/systemd/systemd_206.bb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_206.bb +5 -1
index 75bdc61..519d50f 100644
@@ -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 \
Signature · 1 line
1.7.10.4
#4 lore raw
In reply to [email protected]

ping...

-Roy

Quoted 19 lines · On 09/04/2013 02:56 PM, [email protected] wrote:

From: "Roy.Li" <[email protected]>

The following changes since commit 8c272641ef3e8410f331ca4133d28dea8f36e4f4:

lib/oeqa/runtime: smart: serve repo on host ip only and increase timeout (2013-09-03 19:57:31 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib roy/systemd-1
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/systemd-1

Roy.Li (2):
systemd-compat-units: do not create runlevel command
systemd: link runlevel from systemctl

  meta/recipes-core/systemd/systemd-compat-units.bb |    5 -----
  meta/recipes-core/systemd/systemd_206.bb          |    6 +++++-
  2 files changed, 5 insertions(+), 6 deletions(-)
Signature · 2 lines
Best Reagrds,
Roy | RongQing Li
#5 lore raw
Quoted 2 lines · Rongqing Li

ping...

You replied to your patch question if it was right, therefore I put this off expecting an updated patchset.

Or are you asking about 2/2?

Sau!

Quoted 25 lines

-Roy

Quoted 21 lines · On 09/04/2013 02:56 PM, [email protected] wrote:

From: "Roy.Li" <[email protected]>

The following changes since commit
8c272641ef3e8410f331ca4133d28dea8f36e4f4:

lib/oeqa/runtime: smart: serve repo on host ip only and increase
timeout (2013-09-03 19:57:31 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib roy/systemd-1
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/systemd-1

Roy.Li (2):
systemd-compat-units: do not create runlevel command
systemd: link runlevel from systemctl

  meta/recipes-core/systemd/systemd-compat-units.bb |    5 -----
  meta/recipes-core/systemd/systemd_206.bb          |    6 +++++-
  2 files changed, 5 insertions(+), 6 deletions(-)