[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse-factory
Subject:    Re: [opensuse-factory] Tumbleweed update to 20200201 removed /etc/services
From:       Bernard Lang <Bernard.Lang () datcha ! net>
Date:       2020-02-22 22:45:01
Message-ID: 20200222224501.GH30553 () datcha ! net ! datcha ! net
[Download RAW message or body]

* Knurpht-openSUSE <knurpht@opensuse.org>, le 22-02-20, a écrit:
> Looks like, like me, you never changed the packaged default file, in which 
> case it's safe to go:
> cp /etc/nsswitch.conf /etc/nsswitch,.conf.`date +%F`
> cp /etc/nsswitch.conf.rpmnew /etc/nsswitch.conf
> 

Thanks for all answers.  They seem to suggest that I should consider that
my /etc/nsswitch.conf was never edited, and that I should therefore simply
replace it by the file nsswitch.conf.rpmnew, as explained, e.g., in "Dealing
with .rpmnew and .rpmsave files" located at
https://www.linux.com/news/dealing-rpmnew-and-rpmsave-files/

However the info in my post shows a third file, nsswitch.confbak
with a date older than nsswitch.conf and nsswitch.conf.rpmnew

Though I did not do any editing myself, I have to assume that some
modification must have been done by/for some piece of software ... hopefully
for a good reason, renaming the original file nsswitch.confbak, and keeping
the modified file as nsswitch.conf.
  This modification concerns the file /etc/hosts which was changed from 
hosts:        files dns
   in line 29 of nsswitch.confbak to
hosts:        files mdns_minimal [NOTFOUND=return] dns
   in line 29 of nsswitch.conf

(see # diff nsswitch.conf nsswitch.confbak)

It is also clear that this change was not applied to the new file
nsswitch.conf.rpmnew. So my guess is that I should indeed make a merge by
changing accordingly nsswitch.conf.rpmnew, replacing its line 29 with that of
file nsswitch.conf to preserve the change made for /etc/hosts

But I would feel more comfortable if I really understood what the change does.
As I understand it from reading comments in /etc/nsswitch.conf it restricts
hosts to local information given by /etc/hosts and mdns_minimal
(/usr/lib64/libnss_mdns_minimal.so.2), unless mdns_minimal is missing (to keep
it simple), thus ignoring dns. But why do this? And why not document/comment
the change?

It actually bothers me that there is not more formalized support for keeping
older versions of the files, with comments justifying the changes, so that
merging versions could be made safely enough.  What should I do if I did not
have the old file nsswitch.confbak.  ... Though I am not sure I like what I am
doing.

It is not unfrequent that a configuration created by une user has to be later
maintained by another one, who does not know everything about it. This should
be supported (not a criticism of SUSE).

Bernard

-- 

  Bernard.Lang@datcha.net     ,_  /\o    \o/     mobile  +33 6 6206 1693
  http://www.datcha.net/     ^^^^^^^^^^^^^^^^^   fixe    +33 1 3056 1693

-- 
To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic