Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
openrc overwrites /etc/hosts on each reboot?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Januszzz
Guru
Guru


Joined: 04 Feb 2006
Posts: 367
Location: Opole, Poland

PostPosted: Thu Jan 08, 2009 7:17 am    Post subject: openrc overwrites /etc/hosts on each reboot? Reply with quote

Hi, I upgraded to openrc-0.4.1-r1, sysvinit-2.86-r10 and udev-130.

All is fine now except /etc/hosts.

Each reboot I got my /etc/hosts overwritten in some way: when I put lines at the end of the file, I lost them on reboot, if I put entries in the middle - all is ok.

Which function of openrc does this and where to turn of the buggy feature?

PS. Although all was fine, I had to advise openrc to not start an ununsed interface with dhcp - it messes all networking so be warned.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jan 08, 2009 10:01 am    Post subject: Reply with quote

OpenRC does not touch /etc/hosts in any way or form
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Januszzz
Guru
Guru


Joined: 04 Feb 2006
Posts: 367
Location: Opole, Poland

PostPosted: Thu Jan 08, 2009 10:23 am    Post subject: Reply with quote

Thank you, so what the f does touch, maybe udev?

I'm confused. :?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Thu Jan 08, 2009 10:45 am    Post subject: Reply with quote

I am not sure what would cause this. But some things you can check are these:


  • have you added/modified manually any script under /etc/init.d?
  • have you inserted stuff in /etc/conf.d/local.start/stop?
  • you could try chmod'ing -w /etc/hosts, maybe the responsible script will fail at boot time giving you some hint on where to look...
Back to top
View user's profile Send private message
Januszzz
Guru
Guru


Joined: 04 Feb 2006
Posts: 367
Location: Opole, Poland

PostPosted: Thu Jan 08, 2009 12:35 pm    Post subject: Reply with quote

# have you added/modified manually any script under /etc/init.d?
# have you inserted stuff in /etc/conf.d/local.start/stop?

No, of course I didn't.

# you could try chmod'ing -w /etc/hosts, maybe the responsible script will fail at boot time giving you some hint on where to look...

I went harder and did chattr +i on the file. Nothing breaks (at least I cannot see during startup, its VE I'm saying again; rc-status shows all ok).

But what surprises me - its part of /etc/hosts file now:

Quote:
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
# Auto-generated hostname. Please do not remove this comment.
127.0.0.1 VDesktop


It seems that there is a script which adds 127.0.0.1 entry and removes all other entries below the line. Grepping /etc/init.d for hosts gives one unimportant line in nscd.

I'm surprised and still confused :? user generated data is sacred.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum