diff options
author | Karel Zak | 2014-05-13 15:07:08 +0200 |
---|---|---|
committer | Karel Zak | 2014-05-13 15:23:42 +0200 |
commit | 0f283438bfdf7b6e6e916b63a2c317d938b1463a (patch) | |
tree | 13b2371c39f5d962d71a045d343cd0263640fb91 /term-utils/agetty.8 | |
parent | lib/colors: add to the man page hint about $HOME stuff (diff) | |
download | kernel-qcow2-util-linux-0f283438bfdf7b6e6e916b63a2c317d938b1463a.tar.gz kernel-qcow2-util-linux-0f283438bfdf7b6e6e916b63a2c317d938b1463a.tar.xz kernel-qcow2-util-linux-0f283438bfdf7b6e6e916b63a2c317d938b1463a.zip |
agetty: use the "best" interface for \4 and \6
The issue file escape sequences \4 and \6 prints the host IP when no
interface is specified. That's useless on some virtual machines where
gethostname()+getaddrinfo() returns 127.0.0.1.
The seems better to print IP of the "best" interface (UP, RUNNING, non-LOOPBACK)
and use gethostname() as painful fallback only.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1090935
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/agetty.8')
-rw-r--r-- | term-utils/agetty.8 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/term-utils/agetty.8 b/term-utils/agetty.8 index ad0bfa02b..5fd80858f 100644 --- a/term-utils/agetty.8 +++ b/term-utils/agetty.8 @@ -305,12 +305,13 @@ followed by one of the letters explained below. .TP 4 or 4{interface} -Insert the IPv4 address of the machine hostname or IPv4 address the configured -network interface if the interface argument is specified (e.g. \\4{eth0}). +Insert the IPv4 address the specified network interface (e.g. \\4{eth0}) +and if the interface argument is not specified then select the first fully +configured (UP, non-LOCALBACK, RUNNING) interface. If not found any +configured interface fall back to IP address of the machine hostname. .TP 6 or 6{interface} -Insert the IPv6 address of the machine hostname or IPv6 address the configured -network interface if the interface argument is specified (e.g. \\6{eth0}} +The same as \\4 but for IPv6. .TP b Insert the baudrate of the current line. |