diff options
| -rw-r--r-- | meta/recipes-core/systemd/systemd-serialgetty.bb | 13 | ||||
| -rw-r--r-- | meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service | 45 |
2 files changed, 1 insertions, 57 deletions
diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb index daac7f4198..c3fe9d5b6d 100644 --- a/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb | |||
| @@ -9,13 +9,6 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;m | |||
| 9 | # required. This recipe (enabled via disabling serial-getty-generator in systemd) | 9 | # required. This recipe (enabled via disabling serial-getty-generator in systemd) |
| 10 | # should only be used if the generator is not appropriate. | 10 | # should only be used if the generator is not appropriate. |
| 11 | 11 | ||
| 12 | SERIAL_TERM ?= "linux" | ||
| 13 | |||
| 14 | SRC_URI = "file://serial-getty@.service" | ||
| 15 | |||
| 16 | S = "${WORKDIR}/sources" | ||
| 17 | UNPACKDIR = "${S}" | ||
| 18 | |||
| 19 | # As this package is tied to systemd, only build it when we're also building systemd. | 12 | # As this package is tied to systemd, only build it when we're also building systemd. |
| 20 | inherit features_check | 13 | inherit features_check |
| 21 | REQUIRED_DISTRO_FEATURES += "systemd" | 14 | REQUIRED_DISTRO_FEATURES += "systemd" |
| @@ -24,11 +17,7 @@ REQUIRED_DISTRO_FEATURES += "usrmerge" | |||
| 24 | do_install() { | 17 | do_install() { |
| 25 | if [ ! -z "${SERIAL_CONSOLES}" ] ; then | 18 | if [ ! -z "${SERIAL_CONSOLES}" ] ; then |
| 26 | default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'` | 19 | default_baudrate=`echo "${SERIAL_CONSOLES}" | sed 's/\;.*//'` |
| 27 | install -d ${D}${systemd_system_unitdir}/ | ||
| 28 | install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ | 20 | install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ |
| 29 | install -m 0644 ${S}/serial-getty@.service ${D}${systemd_system_unitdir}/ | ||
| 30 | sed -i -e "s/\@BAUDRATE\@/$default_baudrate/g" ${D}${systemd_system_unitdir}/serial-getty@.service | ||
| 31 | sed -i -e "s/\@TERM\@/${SERIAL_TERM}/g" ${D}${systemd_system_unitdir}/serial-getty@.service | ||
| 32 | 21 | ||
| 33 | tmp="${SERIAL_CONSOLES}" | 22 | tmp="${SERIAL_CONSOLES}" |
| 34 | for entry in $tmp ; do | 23 | for entry in $tmp ; do |
| @@ -51,7 +40,7 @@ do_install() { | |||
| 51 | } | 40 | } |
| 52 | 41 | ||
| 53 | # This is a machine specific file | 42 | # This is a machine specific file |
| 54 | FILES:${PN} = "${systemd_system_unitdir}/*.service ${sysconfdir}" | ||
| 55 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 43 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 44 | FILES:${PN} = "${sysconfdir}" | ||
| 56 | 45 | ||
| 57 | ALLOW_EMPTY:${PN} = "1" | 46 | ALLOW_EMPTY:${PN} = "1" |
diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service deleted file mode 100644 index b16fe1188e..0000000000 --- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | # SPDX-License-Identifier: LGPL-2.1+ | ||
| 2 | # | ||
| 3 | # This file is part of systemd. | ||
| 4 | # | ||
| 5 | # systemd is free software; you can redistribute it and/or modify it | ||
| 6 | # under the terms of the GNU Lesser General Public License as published by | ||
| 7 | # the Free Software Foundation; either version 2.1 of the License, or | ||
| 8 | # (at your option) any later version. | ||
| 9 | |||
| 10 | [Unit] | ||
| 11 | Description=Serial Getty on %I | ||
| 12 | Documentation=man:agetty(8) man:systemd-getty-generator(8) | ||
| 13 | Documentation=http://0pointer.de/blog/projects/serial-console.html | ||
| 14 | PartOf=dev-%i.device | ||
| 15 | ConditionPathExists=/dev/%i | ||
| 16 | After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target | ||
| 17 | After=rc-local.service | ||
| 18 | |||
| 19 | # If additional gettys are spawned during boot then we should make | ||
| 20 | # sure that this is synchronized before getty.target, even though | ||
| 21 | # getty.target didn't actually pull it in. | ||
| 22 | Before=getty.target | ||
| 23 | IgnoreOnIsolate=yes | ||
| 24 | |||
| 25 | # IgnoreOnIsolate causes issues with sulogin, if someone isolates | ||
| 26 | # rescue.target or starts rescue.service from multi-user.target or | ||
| 27 | # graphical.target. | ||
| 28 | Conflicts=rescue.service | ||
| 29 | Before=rescue.service | ||
| 30 | |||
| 31 | [Service] | ||
| 32 | Environment="TERM=@TERM@" | ||
| 33 | ExecStart=-/sbin/agetty -8 -L %I @BAUDRATE@ $TERM | ||
| 34 | Type=idle | ||
| 35 | Restart=always | ||
| 36 | UtmpIdentifier=%I | ||
| 37 | TTYPath=/dev/%I | ||
| 38 | TTYReset=yes | ||
| 39 | TTYVHangup=yes | ||
| 40 | KillMode=process | ||
| 41 | IgnoreSIGPIPE=no | ||
| 42 | SendSIGHUP=yes | ||
| 43 | |||
| 44 | [Install] | ||
| 45 | WantedBy=getty.target | ||
