Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
agetty: add support for /etc/issue.d
The /etc/issue file has been originally designed to inform users about the system (version, name, etc.). In last years is growing number of additional tools (containers, maintenance tools and interfaces, ...) and many admins and downstream maintainer want to add some tool specific hints to the issue file, but it mess to share one file between more packages and/or scripts. The solution is /etc/issue.d directory. The directory is extension to the standard system /etc/issue. The /etc/issue file has to exist, otherwise the directory will be ignored. It means "rm /etc/issue" (or --onissue) is still the way how keep our system silent independently on 3rd-party installed files in the /etc/issue.d directory. The content of the files in the directory are printed after content of the /etc/issue. The files are printed in version-sort order and .issue file extension is required (00-foo.issue 01-bar.issue ...). The change is backwardly compatible. Signed-off-by: Karel Zak <kzak@redhat.com>
- Loading branch information
Showing
3 changed files
with
171 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1fc82a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only want to make aware that quite some distributions (CoreOS, openSUSE, ...) are already using tools using /etc/issue.d. We should make sure to not break this. Currently this breaks all existing solutions.
1fc82a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... they use *.issue files in the directory?
Anyway, we can add ./configure (e.g. --disable-agetty-issued) option to disable this feature.
1fc82a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, missed that the files have to end on .issue, so this should not become a problem. Else all implementations I'm aware of are using it in the same way as agetty, except that additional /usr/lib/issue.d and /run/issue.d are used.
1fc82a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have discussion about this on mailing list right now :-)
It's good idea to add /run and /usr/lib between the directories in the next version, but I'll probably prefer to use "agetty" in the path (/usr/lib/agetty/issued.d/ etc.).
The final goal is to use /run to store output from 3rd party generators, so it should be possible to adopt to the new agetty feature if you already have any solution, ... but it's too late for v2.32 where is support for /etc/issue.d only. Let's wait for the next v2.33.
1fc82a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In https://github.com/thkukuk/issue-generator (which uses the same algorithm and semantic as CoreOS) the order is /usr/lib/issue.d (contains distribution stuff), which can be overwritten by /run/issue.d (dynamic generated by e.g. udev), which can be overwritten by the admin in /etc/issue.d.
If agetty could do the same, that would be really great, then we would not need issue-generator and the CoreOS implementation any longer, but have a drop in replacement without problems during update. I don't like the "agetty" in the path, this makes it tool depending.
1fc82a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Makes sense.