Use /run/issue.d for generated issue snippets
Closed this issue · 7 comments
Currently, the default in Fedora is to have agetty
search /etc/issue.d/
for issue files to display before login at the serial console.
issuegen
generates an issue at runtime, and places the generated file in /run/issue.d/
. To have agetty
display this, a symlink from /etc/issue.d/
to /run/issue.d/
is needed.
It would be preferable not to need a symlink, and instead have agetty
search /run/issue.d/
by default (in addition to /etc/issue.d/
. This requires changing upstream code that will go into Fedora. SELinux policy changes may be needed as well to allow agetty
to read other directories (related).
The change would implement near equivalent functionality of a similar change in pam_motd.
Alternatively, the pam_issue
module could be modified to support a list of issue paths, and have the Fedora default way of displaying issue
files changed from agetty
to a service that uses pam_issue
. But changing the Fedora default is a lot more significant than the first option, and unlikely to be adopted just for the console-login-helper-messages
package.
has the upstream source changed any?
It seems there is now support for /run/issue{.d}
, /usr/lib/issue{.d}
, and util-linux-2.35
is available in Fedora >= 32.
We can have c-l-h-m
in Fedora use /run/issue.d
for the snippet it writes (currently it writes into /run/console-login-helper-messages
), and have this change in a new release of c-l-h-m
timed after Fedora 32 is officially released. For backwards compatibility for systems with a util-linux
version below 2.35
, a command line option like issuegen --legacy
could be available to keep using the private directory.
WDYT about go ahead and modify the sources now and do a new release and we can just build it for f32+ ?
the fedora cloud base image uses c-l-h-m
already so we can test it there and we have a next
stream coming in Fedora CoreOS that can go ahead and take advantage of it
SGTM to make the change now! I will start on changing the source, and should have a PR today or tomorrow.
With the updated util-linux, the current logic is that /run/issue
and /run/issue.d
will only be searched if /etc/issue
is not present. Reference: util-linux/util-linux@456bcbc#diff-1a88921242270a199a0c569fd343b41fR357 (also tried locally). For now, I'll leave the symlink from /etc/issue.d
to the location under /run
in place.
It may be feasible to modify agetty with an option to override this behavior and display multiple issue paths - opened an issue for this: util-linux/util-linux#1041
Option in agetty to override this behavior and display multiple issue paths is now in util-linux release 2.36