2014-07-27 14:30 GMT+03:00 Grand Duet <[email protected]>:
> 2014-07-27 13:39 GMT+03:00 Walter Dnes <[email protected]>:
>> On Sun, Jul 27, 2014 at 12:21:23PM +0300, Grand Duet wrote
>>> This is a continuation of the thread:
>>> "Something went wrong with DNS, plz help!"
>>>
>>> Now, the issue became clearer, so I decided to start
>>> a new thread with more descriptive Subject.
>>>
>>> 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
>>> 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
>>>
>>> I tried to chmod this file to be unwrittable even for root
>>> but after a reboot it have been overwritten anyway.
>>>
>> A similar problem was noted at...
>> https://forums.gentoo.org/viewtopic-t-816332-start-0.html
>
> Like in the thread above, I also have a line
> dns_domain_lo="mynetwork"
> in my /etc/conf.d/net file. It says nothing to me
> and I do not remember how it got there.
>
> But somewhere on Gentoo forum I have found the following
> explanation: "If you only specify dns_domain_lo="foo" and
> restart the lo interface it will put "domain foo" in /etc/resolv.conf
> and remove everything else."
>
> So, I guess I should try to remove that line from my /etc/conf.d/net file.
>
> But why the system worked fine for about a year *with* this line then?
Well, after finishing my main job, I finally got an idea
why everything went wrong after the last system update.
During my last system update, portage instructed me to add
dev-lang/tk-8.5.15 threads
line to my /etc/portage/package.use file.
Here is the portage message about it:
The following USE changes are necessary to proceed:
(see "package.use" in the portage(5) man page for more details)
# required by dev-lang/ruby-1.9.3_p484[tk]
# required by dev-ruby/rake-0.9.6[ruby_targets_ruby19]
# required by dev-lang/ruby-2.0.0_p353
# required by dev-ruby/racc-1.4.9[ruby_targets_ruby20]
# required by dev-ruby/rdoc-4.0.1-r1[ruby_targets_ruby19]
=dev-lang/tk-8.5.15 threads
And in my /etc/portage/package.use file this line has already
been commented. So, I just uncommented it. But I do remember
that it was commented for a reason, though do not remember
exactly why.
May be uncommenting that line allowed bringing up
lo and eth0 interfaces *in parallel*. If it is the case,
then I have an easy explanation why the contents
of /etc/resolv.conf file after boot is unpredictable.
If eth0 starts after lo, then I have the right /etc/resolv.conf
file, however if lo starts after eth0, then the DNS IPs in
resolv.conf file are overwritten with dummy instruction
for lo interface.
What do you think?
>> Can you post the contents of your /etc/conf.d/net
>
> hostname="myhostname"
> dns_domain_lo="mynetwork"
>
> config_eth0="My.Local.IP netmask My.Net.Mask broadcast
> Broadcast.IPof.My.LocalNetwork"
> routes_eth0="default via Local.IPof.My.Gateway"
>
> dns_servers_eth0="My.First.DNS.IP My.Second.DNS.IP 8.8.8.8"
>
> mtu_eth0="1500" # if needed
>
> # The network scripts are now part of net-misc/netifrc
> # In order to avoid sys-apps/openrc-0.12.4 from removing this file,
> this comment was
> # added; you can safely remove this comment. Please see
> # /usr/share/doc/netifrc*/README* for more information.
>
>> and also the output of the "rc-update show" command?
>
> # rc-update show
> alsasound | boot
> bootmisc | boot
> dbus | default
> devfs | sysinit
> dmesg | sysinit
> fsck | boot
> hostname | boot
> hwclock | boot
> keymaps | boot
> killprocs | shutdown
> kmod-static-nodes | sysinit
> local | default
> localmount | boot
> loopback | boot
> metalog | default
> modules | boot
> mount-ro | shutdown
> mtab | boot
> net.eth0 | default
> net.lo | boot
> netmount | default
> privoxy | default
> procfs | boot
> root | boot
> savecache | shutdown
> swap | boot
> swapfiles | boot
> sysctl | boot
> sysfs | sysinit
> termencoding | boot
> tmpfiles.dev | sysinit
> tmpfiles.setup | boot
> udev | sysinit
> udev-mount | sysinit
> urandom | boot
>
> Everywhere above eth0 has been put instead of its udev "predictable" name.
>
> Do you think that I need
> carrier_timeout_eth0=20
> somewhere in /etc/conf.d/net ?
>
> Thank you.
>
>> That should help narrow down the potential sources of your problem.