hostname(1) in the net-tools package does not return FQDN with the -f switch if the host has only AAAA record and no A record/IPv4 address. Reproducible: Always Steps to Reproduce: 1. emerge net-tools 2. set the hostname to one that has _only_ an IPv6 address 3. `hostname -f' fails Actual Results: # hostname -f hostname: No address associated with name Expected Results: It should have printed the FQDN. Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.3) ================================================================= System uname: 2.6.3 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.4.3.13 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X acpi alsa avi crypt dvd encode foomaticdb gif gpm gtk gtk2 imlib ipv6 java jpeg libg++ mad maildir mmx mpeg ncurses nocardbus oggvorbis opengl pam pdflib perl plotutils png postgres quicktime readline sasl sdl sse ssl svga tcpd tetex truetype usb wmf x86 xml2 xmms xv zlib"
Created attachment 26197 [details] hostname(1) ipv6 support patch It's a patch against hostname.c in net-tools-1.60. Compile with -DIPV6 to use it.
I mailed the patch to the net-tools maintainers about a month ago but haven't heard anything since. Seems the package hasn't been maintained for a while.
i assume this is still an issue with 1.60-r9 ? if so, please re-make the diff with `diff -u` and i'll get it added for 1.60-r10
cleaned up and added to net-tools-1.60-r11