Josh Triplett writes:
> Which effectively means the admin should never delete any existing entry
> in the file, only add their own.

It's a configuration file that is not supposed to ever be changed.  If
there are local changes, an admin will likely not include updates
provided by newer packages.

Sadly there are quite a bunch of files in /etc that aren't really
configuration files :(

> Much like /usr/share/misc/pci.ids and other such databases that record
> the state of the real world and standards committees, editing these
> files at all seems questionable.

It is.

> Suppose, hypothetically, that these
> files all moved to /usr/share/misc/ , and then libnss_files.so learned
> to read both /etc/$file and /usr/share/misc/$file , with the former not
> existing by default?

That assumes the files are only accessed via libnss_files.so.  There are
however programs that just access the files directly.  You also require
a particular configuration of nsswitch.conf: what if I look up services
via ldap? :)

One can create /etc/services.local and have a service that merges
services.local with the distribution-provided services to
/var/lib/netbase/services.  /etc/services could then be a symlink to
that file.  (If services.local is empty, /var/lib/netbase/services could
just be a symlink as well to save disk space.)

Or one can just hope a reasonable admin doesn't touch these files (the
current state).

Ansgar

Reply via email to