Get rid of grml-runtty
authorDarshaka Pathirana <dpat@syn-net.org>
Sun, 21 May 2017 17:34:32 +0000 (19:34 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 24 May 2017 06:35:53 +0000 (08:35 +0200)
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

etc/grml/fai/config/files/etc/systemd/system/getty@tty1.service.d/override.conf/GRMLBASE
etc/grml/fai/config/files/etc/systemd/system/getty@tty2.service.d/override.conf/GRMLBASE
etc/grml/fai/config/files/etc/systemd/system/getty@tty3.service.d/override.conf/GRMLBASE
etc/grml/fai/config/files/etc/systemd/system/getty@tty4.service.d/override.conf/GRMLBASE

index fdc8da2..e640aff 100644 (file)
@@ -1,11 +1,15 @@
 # This file was deployed via grml-live.
 
 [Service]
 # 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
 TTYVTDisallocate=no
+ExecStart=
+ExecStart=-/usr/share/grml-scripts/run-welcome
 
 [Unit]
 
 [Unit]
+Description=grml-quickconfig on tty1
 After=grml-autoconfig.service
 After=grml-autoconfig.service
index b47ed12..87b9e67 100644 (file)
@@ -2,5 +2,12 @@
 
 [Service]
 Type=idle
 
 [Service]
 Type=idle
+Restart=always
+StandardInput=tty
+StandardOutput=tty
+TTYPath=/dev/tty2
 ExecStart=
 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
index 30f38d5..786468e 100644 (file)
@@ -2,5 +2,12 @@
 
 [Service]
 Type=idle
 
 [Service]
 Type=idle
+Restart=always
+StandardInput=tty
+StandardOutput=tty
+TTYPath=/dev/tty3
 ExecStart=
 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
index 185d389..a94f83a 100644 (file)
@@ -2,5 +2,13 @@
 
 [Service]
 Type=idle
 
 [Service]
 Type=idle
+Restart=always
+StandardInput=tty
+StandardOutput=tty
+TTYPath=/dev/tty4
+User=$USERNAME
 ExecStart=
 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