Description of problem: hostname -a or --alias not working for ip address defined in /etc/hosts $ grep $(hostname) /etc/hosts 192.168.0.132 wb.home.test wb $ hostname -a $ Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. place your node's ip address in /etc/hosts with an alias. 2. hostname -a 3. valid result should be the same as hostname -s /etc/hosts file should look something like mine $ cat /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.0.132 wb.home.test wb you can get your ip address with the ifconfig command. Example $ ifconfig | grep inet | grep broadcast inet 192.168.0.132 netmask 255.255.255.0 broadcast 192.168.0.255 Workaround: use hostname -s or --short Reproducible: Steps to Reproduce:
hostname --ip-address is also broke $ hostname --ip-address ::1 $ ifconfig enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.132 netmask 255.255.255.0 broadcast 192.168.0.255 ether a0:f3:c1:00:3c:1e txqueuelen 1000 (Ethernet) RX packets 761 bytes 641981 (626.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 679 bytes 76888 (75.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 0 (Local Loopback) RX packets 1664 bytes 774796 (756.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1664 bytes 774796 (756.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Summary: 5a2: hostname -a or --alias not working for ip address => 5a2: hostname -a or --alias and --ip-address not working
As stated on the dev ml: https://ml.mageia.org/l/arc/dev/2014-09/msg00347.html This is probably why Fedora's net-tools 2.0 deletes the *hostname* binaries and they have a separate hostname package. We should import it, include in it a conflicts on net-tools up through the current version-release, add a Requires in basesystem-mininal for hostname, and then drop the hostname commands from net-tools.
CC: (none) => luigiwalserAssignee: bugsquad => thomas
cf. https://bugzilla.novell.com/show_bug.cgi?id=872264
CC: (none) => mrmazda
Felix, in response to your comment on the other bugzilla, upstream is net-tools on SourceForge.
(In reply to David Walser from comment #2) > As stated on the dev ml: > https://ml.mageia.org/l/arc/dev/2014-09/msg00347.html > > This is probably why Fedora's net-tools 2.0 deletes the *hostname* binaries > and they have a separate hostname package. We should import it, include in > it a conflicts on net-tools up through the current version-release, add a > Requires in basesystem-mininal for hostname, and then drop the hostname > commands from net-tools. hostname-3.15 has now been imported to cauldron. There is also a RH patch in it that I don't understand. I will add a Conflicts: net-tools <= net-tools-2.0-0.20140707git.3
Status: NEW => ASSIGNED
new net-tools removed hostname. :( I had to manually install the new hostname rpm. alias and ip-address switches work
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED
You wouldn't have had to manually install it if you'd waited a few minutes :o) (it's now a require of basesystem-minimal), but yes this is fixed now. Thank you very much for the report (and confirmation that it fixes the issues).