]> git.ipfire.org Git - thirdparty/util-linux.git/commit - term-utils/agetty.c
agetty: Reprompt once the network addresses change if address displayed
authorStef Walter <stefw@redhat.com>
Fri, 3 Jul 2015 12:48:44 +0000 (14:48 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 20 Jul 2015 09:17:23 +0000 (11:17 +0200)
commite36deb6424e80b2d35bfe6e0069483544da614f1
tree8a50ce09f974996a73c462f2670f6a8297060fdb
parent9b83e7a48d023b2822de930c9408a127654144f1
agetty: Reprompt once the network addresses change if address displayed

Several of the /etc/issue escape codes such as \4 and \6 depend on
the current addresses of the system that 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.

Similar to the --reload mechanism, if we're displaying an address
in the issue output, and the user hasn't typed anything yet: then
redisplay the prompt with the new address.

We use netlink to watch for address changes. We only open the netlink
socket if we display an address in the issue file.
term-utils/agetty.c