systemd-serialgetty improvement
cover systemd-serialgetty improvement
The following changes since commit 720cd3f32ca8cc4701e99effdd3b3da0cca8348d:
digitemp: fix QA issues: (2011-11-28 11:58:39 +0100)
are available in the git repository at:
git://github.com/OSSystems/meta-oe master
https://github.com/OSSystems/meta-oe/tree/master
Otavio Salvador (1):
systemd-serialgetty: use a wrapper script to find getty
.../recipes-core/systemd/systemd-serialgetty.bb | 13 ++++++++++--- .../systemd-serialgetty/[email protected] | 2 +- .../systemd-serialgetty/systemd-serialgetty | 13 +++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100755 meta-oe/recipes-core/systemd/systemd-serialgetty/systemd-serialgetty
Signature · 1 line
1.7.2.5
PATCH 1/1 systemd-serialgetty: use a wrapper script to find getty
The following binaries are checked:
/sbin/agetty
/sbin/mingetty
/sbin/getty
So this works out of box in most cases and doesn't enforce one getty as dependency.
--- .../recipes-core/systemd/systemd-serialgetty.bb | 13 ++++++++++--- .../systemd-serialgetty/[email protected] | 2 +- .../systemd-serialgetty/systemd-serialgetty | 13 +++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100755 meta-oe/recipes-core/systemd/systemd-serialgetty/systemd-serialgetty
meta-oe/recipes-core/systemd/systemd-serialgetty.bb +10 -3
@@ -2,12 +2,13 @@ DESCRIPTION = "Systemd serial config" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=751419260aa954499f7abaabaa882bbe" -PR = "r1" +PR = "r2" SERIAL_CONSOLE ?= "115200 ttyS0" SRC_URI = "file://LICENSE \ - file://[email protected]" + file://[email protected] \ + file://systemd-serialgetty" def get_baudrate(bb, d): return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[0]
@@ -22,6 +23,9 @@ do_install() { install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ install ${WORKDIR}/[email protected] ${D}${base_libdir}/systemd/system/ + # Install wrapper that looks for available getty binary + install -m 755 ${WORKDIR}/systemd-serialgetty ${D}${base_libdir}/systemd/ + # enable the service ln -sf ${base_libdir}/systemd/system/[email protected] \ ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(bb, d)}.service
@@ -34,5 +38,8 @@ RRECOMMENDS_${PN} = "" RDEPENDS_${PN} = "systemd" # This is a machine specific file -FILES_${PN} = "${base_libdir}/systemd/system/[email protected] ${sysconfdir}" +FILES_${PN} = "${base_libdir}/systemd/systemd-serialgetty \ + ${base_libdir}/systemd/system/[email protected] \ + ${sysconfdir} \ + " PACKAGE_ARCH = "${MACHINE_ARCH}"
meta-oe/recipes-core/systemd/systemd-serialgetty/[email protected] +1 -1
@@ -17,7 +17,7 @@ Before=getty.target [Service] Environment=TERM=vt100 -ExecStart=-/sbin/getty @BAUDRATE@ %I +ExecStart=-/lib/systemd/systemd-serialgetty @BAUDRATE@ %I Restart=always RestartSec=0 UtmpIdentifier=%I
meta-oe/recipes-core/systemd/systemd-serialgetty/systemd-serialgetty new file +13 -0
@@ -0,0 +1,13 @@ +#!/bin/sh + +for g in /sbin/agetty \ + /sbin/mingetty \ + /sbin/getty; do + if [ -x "$g" ]; then + $g $@ + exit 0 + fi +done + +echo "Failed to find the getty binary to use." +exit 1
Signature · 1 line
1.7.2.5
Re: [meta-oe][PATCH 1/1] systemd-serialgetty: use a wrapper script to find getty
Quoted 8 lines · Otavio Salvador
The following binaries are checked:
/sbin/agetty
/sbin/mingetty
/sbin/gettySo this works out of box in most cases and doesn't enforce one getty as dependency.
FWIW: I have 2 patches for tinylogin and util-linux-agetty to provide /sbin/getty u-a
openembedded-core-contrib/shr
util-linux: use u-a to provide /sbin/getty from util-linux-agetty
tinylogin: use u-a for getty so we can provide /sbin/getty from util-linux-agetty too
http://git.openembedded.org/openembedded-core-contrib/commit/?h=shr&id=f6aa6fc06af906ab7ee374d544b81f1ef9948403
http://git.openembedded.org/openembedded-core-contrib/commit/?h=shr&id=e34e002f33660591705cd7b21e3a815382a50b3e
I didn't send pull request with them, because I'm still waiting for previous pull request (with libsdl changes) to be applied.
We can add u-a to mingetty and solve whole problem even for sysvinit etc...
Cheers,
Quoted 89 lines
Signed-off-by Otavio Salvador <[email protected]>--- .../recipes-core/systemd/systemd-serialgetty.bb | 13 ++++++++++--- .../systemd-serialgetty/[email protected] | 2 +- .../systemd-serialgetty/systemd-serialgetty | 13 +++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100755 meta-oe/recipes-core/systemd/systemd-serialgetty/systemd-serialgettymeta-oe/recipes-core/systemd/systemd-serialgetty.bb +10
-3@@ -2,12 +2,13 @@ DESCRIPTION = "Systemd serial config" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=751419260aa954499f7abaabaa882bbe" -PR = "r1" +PR = "r2" SERIAL_CONSOLE ?= "115200 ttyS0" SRC_URI = "file://LICENSE \ - file://[email protected]" + file://[email protected] \ + file://systemd-serialgetty" def get_baudrate(bb, d): return bb.data.getVar('SERIAL_CONSOLE', d, 1).split()[0]@@ -22,6 +23,9 @@ do_install() { install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ install ${WORKDIR}/[email protected] ${D}${base_libdir}/systemd/system/ + # Install wrapper that looks for available getty binary + install -m 755 ${WORKDIR}/systemd-serialgetty ${D}${base_libdir}/systemd/ + # enable the service ln -sf ${base_libdir}/systemd/system/[email protected] \ ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(bb, d)}.service@@ -34,5 +38,8 @@ RRECOMMENDS_${PN} = "" RDEPENDS_${PN} = "systemd" # This is a machine specific file -FILES_${PN} = "${base_libdir}/systemd/system/[email protected] ${sysconfdir}" +FILES_${PN} = "${base_libdir}/systemd/systemd-serialgetty \ + ${base_libdir}/systemd/system/[email protected] \ + ${sysconfdir} \ + " PACKAGE_ARCH = "${MACHINE_ARCH}"meta-oe/recipes-core/systemd/systemd-serialgetty/[email protected] +1
-1@@ -17,7 +17,7 @@ Before=getty.target [Service] Environment=TERM=vt100 -ExecStart=-/sbin/getty @BAUDRATE@ %I +ExecStart=-/lib/systemd/systemd-serialgetty @BAUDRATE@ %I Restart=always RestartSec=0 UtmpIdentifier=%Imeta-oe/recipes-core/systemd/systemd-serialgetty/systemd-serialgetty new file +13
-0@@ -0,0 +1,13 @@ +#!/bin/sh + +for g in /sbin/agetty \ + /sbin/mingetty \ + /sbin/getty; do + if [ -x "$g" ]; then + $g $@ + exit 0 + fi +done + +echo "Failed to find the getty binary to use." +exit 1Signature · 7 lines
1.7.2.5 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [meta-oe][PATCH 1/1] systemd-serialgetty: use a wrapper script to find getty
Quoted 2 lines · Martin Jansa
...
FWIW: I have 2 patches for tinylogin and util-linux-agetty to provide
Quoted 9 lines
/sbin/gettyu-aopenembedded-core-contrib/shr
util-linux: use u-a to provide/sbin/gettyfrom util-linux-agetty
tinylogin: use u-a for getty so we can provide/sbin/gettyfrom util-linux-agetty too
Quoted 8 lines
I didn't send pull request with them, because I'm still waiting for previous pull request (with libsdl changes) to be applied.
We can add u-a to mingetty and solve whole problem even for sysvinit etc...
Please do that then. It would be nice to have this pull request ASAP so I can put those into my local repo.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
I'm still coming up to speed on OE standard practices, but on other Unix-like systems I would expect /sbin/getty to be the standard selection, though in some cases a symlink to a preferred alternative. Why does the patch make /sbin/getty the last alternative checked, instead of the first?
Peter
Quoted 26 lines · Otavio Salvador
The following changes since commit
720cd3f32ca8cc4701e99effdd3b3da0cca8348d:digitemp: fix QA issues: (2011-11-28 11:58:39 +0100)
are available in the git repository at:
git://github.com/OSSystems/meta-oe master
https://github.com/OSSystems/meta-oe/tree/masterOtavio Salvador (1):
systemd-serialgetty: use a wrapper script to find getty.../recipes-core/systemd/systemd-serialgetty.bb | 13 ++++++++++--- .../systemd-serialgetty/[email protected] | 2 +- .../systemd-serialgetty/systemd-serialgetty | 13 +++++++++++++
3 files changed, 24 insertions(+), 4 deletions(-)create mode 100755 meta-oe/recipes-core/systemd/systemd-serialgetty/systemd-serialgetty
--
1.7.2.5_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Quoted 6 lines · Peter Bigot
I'm still coming up to speed on OE standard practices, but on other Unix-like systems I would expect
/sbin/gettyto be the standard selection, though in some cases a symlink to a preferred alternative. Why does the patch make/sbin/gettythe last alternative checked, instead of the first?
If people want, I can change it. No problem.
Signature · 3 lines
Otavio Salvador O.S. Systems E-mail: [email protected] http://www.ossystems.com.br Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br