From 48143b65fbe57e2591a1c72e21656f525f4aa79c Mon Sep 17 00:00:00 2001 From: Darshaka Pathirana Date: Sun, 21 May 2017 19:34:32 +0200 Subject: [PATCH] Get rid of grml-runtty What once was done by grml-runtty can be now be accomplished by systemd. That said, there is a weird behavior when starting GNU/screen via "run-screen". When started via grml-runtty screen runs zsh, but when started directly via systemd screen runs /bin/sh (= dash). The reason for that is, that the SHELL variable is empty when called directly via systemd whereas SHELL=/bin/zsh when started via grml-runtty. I could not figure out why but a solution would be to set the "Environment"-option in the systemd-unit which I will propose in a separate commit. (partly) fixes grml/grml#14 --- .../system/getty@tty1.service.d/override.conf/GRMLBASE | 12 ++++++++---- .../system/getty@tty2.service.d/override.conf/GRMLBASE | 9 ++++++++- .../system/getty@tty3.service.d/override.conf/GRMLBASE | 9 ++++++++- .../system/getty@tty4.service.d/override.conf/GRMLBASE | 10 +++++++++- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/etc/grml/fai/config/files/etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE b/etc/grml/fai/config/files/etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE index fdc8da2..e640aff 100644 --- a/etc/grml/fai/config/files/etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE +++ b/etc/grml/fai/config/files/etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE @@ -1,11 +1,15 @@ # This file was deployed via grml-live. [Service] -Type=idle -ExecStart= -ExecStart=-/sbin/grml-runtty /dev/tty1 /usr/share/grml-scripts/run-welcome root -# ExecStart=-/sbin/agetty --autologin $USERNAME --noclear %I 38400 linux +Type=simple +Restart=always +StandardInput=tty +StandardOutput=tty +TTYPath=/dev/tty1 TTYVTDisallocate=no +ExecStart= +ExecStart=-/usr/share/grml-scripts/run-welcome [Unit] +Description=grml-quickconfig on tty1 After=grml-autoconfig.service diff --git a/etc/grml/fai/config/files/etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE b/etc/grml/fai/config/files/etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE index b47ed12..87b9e67 100644 --- a/etc/grml/fai/config/files/etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE +++ b/etc/grml/fai/config/files/etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE @@ -2,5 +2,12 @@ [Service] Type=idle +Restart=always +StandardInput=tty +StandardOutput=tty +TTYPath=/dev/tty2 ExecStart= -ExecStart=-/sbin/grml-runtty /dev/tty2 /usr/share/grml-scripts/run-screen root +ExecStart=-/usr/share/grml-scripts/run-screen + +[Unit] +Description=screen on tty2 diff --git a/etc/grml/fai/config/files/etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE b/etc/grml/fai/config/files/etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE index 30f38d5..786468e 100644 --- a/etc/grml/fai/config/files/etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE +++ b/etc/grml/fai/config/files/etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE @@ -2,5 +2,12 @@ [Service] Type=idle +Restart=always +StandardInput=tty +StandardOutput=tty +TTYPath=/dev/tty3 ExecStart= -ExecStart=-/sbin/grml-runtty /dev/tty3 /usr/share/grml-scripts/run-screen root +ExecStart=-/usr/share/grml-scripts/run-screen + +[Unit] +Description=screen on tty3 diff --git a/etc/grml/fai/config/files/etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE b/etc/grml/fai/config/files/etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE index 185d389..a94f83a 100644 --- a/etc/grml/fai/config/files/etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE +++ b/etc/grml/fai/config/files/etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE @@ -2,5 +2,13 @@ [Service] Type=idle +Restart=always +StandardInput=tty +StandardOutput=tty +TTYPath=/dev/tty4 +User=$USERNAME ExecStart= -ExecStart=-/sbin/grml-runtty /dev/tty4 /usr/share/grml-scripts/run-screen $USERNAME +ExecStart=-/usr/share/grml-scripts/run-screen + +[Unit] +Description=screen ($USERNAME) on tty4 -- 2.1.4