View previous topic :: View next topic |
Author |
Message |
Januszzz Guru
Joined: 04 Feb 2006 Posts: 367 Location: Opole, Poland
|
Posted: Thu Jan 08, 2009 7:17 am Post subject: openrc overwrites /etc/hosts on each reboot? |
|
|
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 |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Januszzz Guru
Joined: 04 Feb 2006 Posts: 367 Location: Opole, Poland
|
Posted: Thu Jan 08, 2009 10:23 am Post subject: |
|
|
Thank you, so what the f does touch, maybe udev?
I'm confused. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Thu Jan 08, 2009 10:45 am Post subject: |
|
|
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 |
|
|
Januszzz Guru
Joined: 04 Feb 2006 Posts: 367 Location: Opole, Poland
|
Posted: Thu Jan 08, 2009 12:35 pm Post subject: |
|
|
# 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 |
|
|
|