From 864a5e9ded1a15b90520ebb11f92b6ab45626a94 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 12 Jun 2025 14:34:13 +0200 Subject: [PATCH] getty: support /run/issue.d/ By default agetty will not display /run/issue.d/ if /etc/issue exists. This is quite unfortunate and has actually been fixed upstream in: https://github.com/util-linux/util-linux/commit/508fb0e7ac103b68531a59db2a4473897853ab52 However, no release has been tagged with this yet, and it doesn't look like this will happen any time soon. Hence, for now, let's add a work-around and manually override the issue files to include. This should be reverted once a new util-linux/agetty release has been tagged, and found its way into the relevant distributions. Given this is mostly about cosmetics we do not have to precisely sync the package updates on this, but only roughly. --- TODO | 4 ++++ units/console-getty.service.in | 2 +- units/container-getty@.service.in | 2 +- units/getty@.service.in | 2 +- units/serial-getty@.service.in | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index f3cfbcbaef..d3cb7873d4 100644 --- a/TODO +++ b/TODO @@ -118,6 +118,10 @@ Deprecations and removals: * Consider removing root=gpt-auto, and push people to use root=dissect instead. +* Once + https://github.com/util-linux/util-linux/commit/508fb0e7ac103b68531a59db2a4473897853ab52 + has hit the prominent distributions, revert --issue-file= hack in units/*getty*sevice.in + Features: * replace bootctl's PE version check to actually use APIs from pe-binary.[ch] diff --git a/units/console-getty.service.in b/units/console-getty.service.in index 2182109009..967d8337ab 100644 --- a/units/console-getty.service.in +++ b/units/console-getty.service.in @@ -20,7 +20,7 @@ Before=getty.target ConditionPathExists=/dev/console [Service] -ExecStart=-/sbin/agetty --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM} +ExecStart=-/sbin/agetty --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d --keep-baud 115200,57600,38400,9600 - ${TERM} Type=idle Restart=always UtmpIdentifier=cons diff --git a/units/container-getty@.service.in b/units/container-getty@.service.in index f24bb73fc1..e0b27613df 100644 --- a/units/container-getty@.service.in +++ b/units/container-getty@.service.in @@ -25,7 +25,7 @@ Conflicts=rescue.service Before=rescue.service [Service] -ExecStart=-/sbin/agetty --noreset --noclear - ${TERM} +ExecStart=-/sbin/agetty --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d - ${TERM} Type=idle Restart=always RestartSec=0 diff --git a/units/getty@.service.in b/units/getty@.service.in index a43e01144f..104c4acc96 100644 --- a/units/getty@.service.in +++ b/units/getty@.service.in @@ -34,7 +34,7 @@ Before=rescue.service ConditionPathExists=/dev/tty0 [Service] -ExecStart=-/sbin/agetty --noreset --noclear - ${TERM} +ExecStart=-/sbin/agetty --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d - ${TERM} Type=idle Restart=always RestartSec=0 diff --git a/units/serial-getty@.service.in b/units/serial-getty@.service.in index c0adaf7bdb..0134c83d48 100644 --- a/units/serial-getty@.service.in +++ b/units/serial-getty@.service.in @@ -30,7 +30,7 @@ Conflicts=rescue.service Before=rescue.service [Service] -ExecStart=-/sbin/agetty --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM} +ExecStart=-/sbin/agetty --noreset --noclear --issue-file=/etc/issue:/etc/issue.d:/run/issue.d:/usr/lib/issue.d --keep-baud 115200,57600,38400,9600 - ${TERM} Type=idle Restart=always UtmpIdentifier=%I