From cb9eb26656c022be9335258ed72da2a397169fc3 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 20 Oct 2015 10:01:07 +0200 Subject: systemd-serialgetty: enable autologin on serial console The long term solution is to change the lava jobs to login, but for now let's cheat and use autologin in the images. Change-Id: Ib1333d1603d9967e931d6e14d225eaba34da7f71 Signed-off-by: Koen Kooi --- .../systemd/systemd-serialgetty.bbappend | 2 ++ .../systemd-serialgetty/serial-getty@.service | 37 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 meta-linaro-integration/recipes-core/systemd/systemd-serialgetty.bbappend create mode 100644 meta-linaro-integration/recipes-core/systemd/systemd-serialgetty/serial-getty@.service diff --git a/meta-linaro-integration/recipes-core/systemd/systemd-serialgetty.bbappend b/meta-linaro-integration/recipes-core/systemd/systemd-serialgetty.bbappend new file mode 100644 index 00000000..8ec0f197 --- /dev/null +++ b/meta-linaro-integration/recipes-core/systemd/systemd-serialgetty.bbappend @@ -0,0 +1,2 @@ +PR = "r5.1" +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" diff --git a/meta-linaro-integration/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta-linaro-integration/recipes-core/systemd/systemd-serialgetty/serial-getty@.service new file mode 100644 index 00000000..bfdb64c7 --- /dev/null +++ b/meta-linaro-integration/recipes-core/systemd/systemd-serialgetty/serial-getty@.service @@ -0,0 +1,37 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Serial Getty on %I +Documentation=man:agetty(8) man:systemd-getty-generator(8) +Documentation=http://0pointer.de/blog/projects/serial-console.html +BindsTo=dev-%i.device +After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service +After=rc-local.service + +# If additional gettys are spawned during boot then we should make +# sure that this is synchronized before getty.target, even though +# getty.target didn't actually pull it in. +Before=getty.target +IgnoreOnIsolate=yes + +[Service] +Environment="TERM=xterm" +ExecStart=-/sbin/agetty --autologin root -8 -L --keep-baud %I @BAUDRATE@ $TERM +Type=idle +Restart=always +RestartSec=0 +UtmpIdentifier=%I +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes +KillMode=process +IgnoreSIGPIPE=no +SendSIGHUP=yes + +[Install] +WantedBy=getty.target -- cgit v1.2.3