Jump to content
Forums in Read-Only Mode - Please use Reddit ×

repeating entries in /etc/hosts


Recommended Posts

What is causing /etc/hosts to be filled with a ton of repeating entries?

192.168.1.50 zfs2
192.168.1.90 zfs3
192.168.1.50 zfs2
192.168.1.90 zfs3
192.168.1.50 zfs2
192.168.1.90 zfs3
192.168.1.50 zfs2
192.168.1.90 zfs3
192.168.1.50 zfs2
192.168.1.90 zfs3
192.168.1.50 zfs2
192.168.1.90 zfs3
192.168.1.50 zfs2
192.168.1.90 zfs3
127.0.0.1	base localhost localhost.localdomain 192.168.1.70 base
192.168.1.50 zfs2
192.168.1.90 zfs3
::1		base localhost localhost.localdomain 192.168.1.70 base
192.168.1.50 zfs2
192.168.1.90 zfs3

The /etc/conf.d/hostname looks like this

hostname=base
aliases="192.168.1.70 base
192.168.1.50 zfs2
192.168.1.90 zfs3"

 

Link to comment
Share on other sites

As I see from your /etc/conf.d/hostname file you are setting aliases from other hosts but my file says:

# If your local system has other aliases for your local interfaces, you can
# add them here. These will also be added to /etc/hosts for 127.0.0.1 and ::1:
# Add aliases for other hosts to /etc/hosts directly. The networking scripts
# automatically generate the localhost lines only.

#aliases="mybox server1"

you should be putting aliases for other hosts in /ect/hosts as the directions say. its how I am doing it and have had no problem like this.

may well be why this is occurring.

 

Link to comment
Share on other sites

I am not sure about that warning, I remember seeing it before but either I maybe deleted it?

just checked laptop and there is no warning there either, but can confirm the same problem Maurice reported,

putting other hosts in aliases inside the quotes does that but goes away when done the way I described... strange!

also @mauricev I don't believe you need to alias your local box like that it already knows its base from the hostname=

but I may be wrong.

Link to comment
Share on other sites

×
×
  • Create New...