View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000156 | Rocky-Linux-9 | rocky-release | public | 2022-07-20 11:32 | 2023-07-31 23:39 |
Reporter | Roman Zhivotovskiy | Assigned To | Louis Abel | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Summary | 0000156: Can't add the name of the current tty before login prompt | ||||
Description | Edit /etc/issue to show current tty by adding \l escape code. Test with agetty --show-issue is fine, but before login prompt I see "-" instead of the current tty name. Try to some other escape codes and they all work fine. In Rocky 8.6 and Fedora 36 I have no such problem. | ||||
Steps To Reproduce | Add \l in /etc/issue Run agetty --show-issue Exit the shell to show message before login prompt | ||||
Tags | No tags attached. | ||||
has duplicate | 0000157 | closed | Louis Abel | Can't add the name of the current tty before login prompt |
Thank you for the report. This behavior appears to have been started by a change in systemd itself upstream, where stdin is used to determine the tty. This works in Fedora as you've seen. This is reproducible in RHEL 9 and CentOS Stream 9, though it is unclear why Fedora does not exhibit this issue. This may be a bug report that can be filed upstream to bugzilla.redhat.com. Context: EL8: [root@router ~]# systemctl status | grep getty │ │ └─3914354 grep --color=auto getty │ ├─system-getty.slice │ │ └─getty@tty1.service │ │ └─2292 /sbin/agetty -o -p -- \u --noclear tty1 linux [root@router ~]# grep 'ExecStart' /usr/lib/systemd/system/getty@.service ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM EL9: [root@awx ~]# systemctl status | grep getty │ ├─system-getty.slice │ │ └─getty@tty1.service │ │ └─5883 /sbin/agetty -o "-p -- \\u" --noclear - linux [root@awx ~]# grep 'ExecStart' /usr/lib/systemd/system/getty@.service ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear - $TERM The change in systemd occurred here: https://github.com/systemd/systemd/commit/b4bf9007cbee7dc0b1356897344ae2a7890df84c If the tty arg is set to "-", agetty uses the stdin fd as the tty. Let's pass the tty this way so that we keep an fd open to the tty at all times. If all fd's to a tty are closed, the kernel might reset the tty which we want to avoid. |
|
Thank You very much for answer! It helped me to understand strange behavior of agetty on my system. | |
Upstream bug has been filed: https://bugzilla.redhat.com/show_bug.cgi?id=2109252 | |
I find: Fedora 36 uses agetty from util-linux 2.38 Rocky Linux uses agetty from util-linux 2.37.4 https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.38/v2.38-ReleaseNotes Changes between v2.37 and v2.38 ... agetty: - ... - resolve tty name even if stdin is specified [tamz] So for fix, we must update agetty |
|
https://github.com/util-linux/util-linux/issues/1546 Systemd 250 changed its getty@ unit file in systemd/systemd@b4bf900 to call agetty with stdin ("-") port as apparently the kernel could have pontentially reset ttys otherwise. This means that any distribution running systemd will now not display the tty device name at the login prompt, but a dash symbol instead (systemd/systemd#21919). |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2022-07-20 11:32 | Roman Zhivotovskiy | New Issue | |
2022-07-20 11:32 | Roman Zhivotovskiy | File Added: bug.png | |
2022-07-20 16:14 | Louis Abel | Relationship added | has duplicate 0000157 |
2022-07-20 17:19 | Louis Abel | Assigned To | => Louis Abel |
2022-07-20 17:19 | Louis Abel | Status | new => confirmed |
2022-07-20 17:19 | Louis Abel | Note Added: 0000291 | |
2022-07-20 18:41 | Louis Abel | Note Edited: 0000291 | |
2022-07-20 18:48 | Roman Zhivotovskiy | Note Added: 0000292 | |
2022-07-20 18:51 | Louis Abel | Note Added: 0000293 | |
2022-07-21 06:18 | Roman Zhivotovskiy | Note Added: 0000296 | |
2022-07-21 06:53 | Roman Zhivotovskiy | Note Added: 0000297 | |
2023-07-31 23:39 | Louis Abel | Status | confirmed => closed |
2023-07-31 23:39 | Louis Abel | Resolution | open => fixed |