Jump to content
mauricev

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"

 

Share this post


Link to post
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.

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...