FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 09-12-2011, 12:15 AM
"R - elists"
 
Default persistent custom lines in /etc/hosts?

>
> I've edited /etc/hosts to add few custom IP/hostnames couples.
> After each reboot, I have to add them again. I've then added
> /etc/sysconfig/network/hosts, but it seems to ignore it or at
> least ignore 127.0.0.1 assignments I'm doing in it.
>
> Is there a mechanism I'm not aware of, or doing things wrong
> to make my custom IP/hostnames assignments permanent after
> network services restart?
snip
> wwp

you didnt tell us much about your centos version etc so....

is your networking set up statically, or is it dhcp dynamic.

if the latter, then "possibly" that is part of the issue

ive always noticed that files like /etc/resolv.conf and others can change in
a generic dhcp environment

...one reason we setup almost everything statically

- rh

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-12-2011, 06:33 AM
wwp
 
Default persistent custom lines in /etc/hosts?

Hello R,


On Sun, 11 Sep 2011 17:15:02 -0700 "R - elists" <lists07@abbacomm.net> wrote:

>
> >
> > I've edited /etc/hosts to add few custom IP/hostnames couples.
> > After each reboot, I have to add them again. I've then added
> > /etc/sysconfig/network/hosts, but it seems to ignore it or at
> > least ignore 127.0.0.1 assignments I'm doing in it.
> >
> > Is there a mechanism I'm not aware of, or doing things wrong
> > to make my custom IP/hostnames assignments permanent after
> > network services restart?
> snip
> > wwp
>
> you didnt tell us much about your centos version etc so....
>
> is your networking set up statically, or is it dhcp dynamic.
>
> if the latter, then "possibly" that is part of the issue
>
> ive always noticed that files like /etc/resolv.conf and others can change in
> a generic dhcp environment
>
> ...one reason we setup almost everything statically

You're right, I'm sorry about this. It's CentOS6, DHCP setup.

When /etc/hosts is rewritten, it keeps the lines that describe remote
hosts (other but 127.0.0.1), but remove my custom assignments to
127.0.0.1, this is the point I'd like to solve. I have to say that the
aliases to 127.0.0.1 are defined on several lines (127.0.0.1 foo
bar
127.0.0.1 a b c
).

I've put in /etc/sysconfig/networking/profiles/default/ a hosts file
with my custom lines in, but this apparently isn't enough.


Regards,

--
wwp
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 10:14 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org