public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matti Nykyri <matti.nykyri@iki.fi>
To: "gentoo-user@lists.gentoo.org" <gentoo-user@lists.gentoo.org>
Subject: Re: [gentoo-user] resolv.conf is different after every reboot
Date: Sun, 27 Jul 2014 16:10:47 +0300	[thread overview]
Message-ID: <CD2BC10F-A15C-44B5-BB63-6FB6D3A7942B@iki.fi> (raw)
In-Reply-To: <CACE6sHkT9P_pZvx7W6tGNwXpNyhqeCRyU67kLDyeSOUEY4dk-A@mail.gmail.com>

> On Jul 27, 2014, at 13:33, Grand Duet <grand.duet@gmail.com> wrote:
> 
> 2014-07-27 12:29 GMT+03:00 Neil Bothwick <neil@digimed.co.uk>:
>>> On Sun, 27 Jul 2014 12:21:23 +0300, Grand Duet wrote:
>>> 
>>> In short: the contents of the file /etc/resolv.conf
>>> is unpredictably different from one reboot to another.
>>> It is either
>>>  # Generated by net-scripts for interface lo
>>>  domain mynetwork
>> 
>> That's what you get when lo comes up.
>> 
>>> or
>>>  # Generated by net-scripts for interface "eth0"
>>>  nameserver My.First.DNS-Server.IP
>>>  nameserver My.Second.DNS-Server.IP
>>>  nameserver 8.8.8.8
>> 
>> That's what replaces it when eth0 comes up.
>> It looks like eth0 is not being brought up fully
> 
> It sounds logical. But how can I fix it?
> 
> Can carrier_timeout_eth0= setting in /etc/conf.d/net file help?
> If so, how much seconds should I use?
> 
>> what do your logs say?
> 
> Could you, please, be more precise where to look for "logs".
> 
>> It might be worth putting logger commands in preup(),
>> postup() and failup() in conf.d/net.
> 
> Currently, I have no such functions in my /etc/conf.d/net file.
> Shall I copy them there from
>  /usr/share/doc/netifrc-0.2.2/net.example
> 
> Could you, please, be more specific on these "logger commands" too.
> 
>>> I tried to chmod this file to be unwrittable even for root
>>> but after a reboot it have been overwritten anyway.
>> 
>> You can't stop root overwriting a file, root laughs in the face of file
>> permissions.
>> 
>> BTW, I'm not sure if it's still relevant, but I don't think you ever
>> posted the contents of /etc/resolvconf.conf, if it exists.
> 
> I do not have such file. Of course, if you do not mean /etc/resolv.conf
> But I have posted its content above.
> 

Depending on your filesystem a temporary solution to your problem is to setup /etc/resolv.conf correctly and then:
chattr +i /etc/resolv.conf

After that the content of the file will not change.

-- 
-Matti

  parent reply	other threads:[~2014-07-27 13:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-27  9:21 [gentoo-user] resolv.conf is different after every reboot Grand Duet
2014-07-27  9:29 ` Neil Bothwick
2014-07-27 10:33   ` Grand Duet
2014-07-27 11:13     ` Dale
2014-07-27 13:10     ` Matti Nykyri [this message]
2014-07-27 13:39       ` Grand Duet
2014-07-27 15:36         ` Matti Nykyri
2014-07-27 19:13     ` Neil Bothwick
2014-07-27 20:38       ` Grand Duet
2014-07-27 22:00         ` Kerin Millar
2014-07-28 15:34           ` Grand Duet
2014-07-30 22:22             ` Kerin Millar
2014-07-27 10:39 ` Walter Dnes
2014-07-27 11:30   ` Grand Duet
2014-07-27 14:50     ` Daniel Frey
2014-07-27 15:08       ` Grand Duet
2014-07-27 20:28         ` Daniel Frey
2014-07-27 20:53           ` Grand Duet
2014-07-27 16:33     ` [gentoo-user] " James
2014-07-27 17:23       ` Grand Duet
2014-07-27 23:00       ` Rich Freeman
2014-07-27 18:14     ` [gentoo-user] " Kerin Millar
2014-07-27 20:26       ` Grand Duet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CD2BC10F-A15C-44B5-BB63-6FB6D3A7942B@iki.fi \
    --to=matti.nykyri@iki.fi \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox