On Sun, Aug 28, 2016 at 8:34 AM, Patrick Lauer <patr...@gentoo.org> wrote:
>
> Then tools forgot to properly update mtab because hurr why u no symlink
> to /proc/mounts (oh wait, /proc/self/mounts )
>
> So everyone migrated to /etc/mtab as a symlink (even OpenRC, because
> everyone does it)
>

I think containers were the final straw here (which strangely you do
not mention).  Good luck running openrc in a container with /etc/mtab
as a file, especially if you want to share /etc across multiple
containers.

Ultimately though this all comes down to the fact that files are a
pretty lousy way to store state of a running system, especially when
there are system calls to retrieve this state.

Sure, files are a nice place to store static configuration that gets
loaded into the state of a running system, since they're persistent.
The problem comes when software reads the files and assumes that they
ARE the state.

/etc should be for storing static configuration.  Processes shouldn't
generally be writing to anything there.  You should be able to mount
/etc read-only without much issue.  With the rise of containers and
configuration management and software-defined infrastructure and so on
this becomes increasingly important.

There is value in neither changing for the sake of change, or
remaining the same for the sake of the past.  Many historical
practices in the Unix world are inconsistent and it makes sense to
keep moving in the direction of making them consistent (like mtab,
having dhcpd modify /etc/resolv.conf, and so on).  Gentoo should make
similar sorts of changes (like not sticking the Gentoo repo in /usr,
and we probably shouldn't name it portage either).

There are also many historical practices in the Unix world that maybe
aren't pretty, but we probably ought not to change them just for the
sake of doing so without driving the change across distros (and I
think /etc/hostname strikes me as one of these; having more of the
host-level configuration in one place does make sense, but moreso if
everybody does it the same way).  Lots of distros actually try to move
configuration to one place, but they do it inconsistently and it seems
like somebody should be able to fix this (though you may find the
demand for consistency ends up getting satisfied by systemd to some
extent, simply due to its ubiquity).

I think williamh's approach of using hostname if it exists, and
falling back to conf.d is a pretty sane compromise.

-- 
Rich

Reply via email to