]> git.ipfire.org Git - thirdparty/util-linux.git/commit
agetty: Reprompt and reprint /etc/issue when asked
authorStef Walter <stefw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Thu, 3 Jul 2014 15:44:41 +0000 (17:44 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 28 Jul 2014 14:33:33 +0000 (16:33 +0200)
commit6443dd43da28885302449aaca4b9c69c7f9585af
tree91e5f9a23be0605df5f032629118f62bb3d38a45
parent25a365ef5a8291929351c40ccadd0d20b9cb1831
agetty: Reprompt and reprint /etc/issue when asked

Add an 'agetty --reload' command which asks all running agetty
commands to display their prompts again.

Several of the /etc/issue escape codes such as \4 and \S depend on
variable data which can change after the agetty prompt is displayed.
This can cause stale data to be displayed when a user looks at a VT,
especially in cases of DHCP racing with system start up.

We never want this to occur once the user has started typing a
user name. So we detect when the user starts typing, after which
no further reprompting occurs after that point.

[kzak@redhat.com: - add #ifdefs to make it usable on non-inotify systems,
                  - use futimens() with NULL timespec
                  - add --reaload to usage()]

Signed-off-by: Stef Walter <stefw-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
term-utils/agetty.8
term-utils/agetty.c