[systemd-devel] Is there a reason to forcefully create /etc/mtab?

Lennart Poettering lennart at poettering.net
Sun Jul 6 12:19:50 PDT 2014


On Sun, 06.07.14 20:13, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:

> > > > I think the path matching is a little naive; Using a simple string
> > > > comparison, "/proc/self/mounts" != "../proc/self/mounts" even though
> > > > both paths refer to the same object.
> > > 
> > > No, they aren't referring to the same object. This makes a difference
> > > when you mount a "foreign" system image for maintainance.
> > 
> > Cool :(
> > 
> > So... the solution would be for distro packages to ship mtab as a symlink to
> > "../proc" instead of "/proc"?
> No, the latter is fine, or even better. The solution is for systmed-tmpfiles
> to stop complaining when the fs is readonly.

I am pretty sure we should complain in that case: after all the mtab
situation was bad enough that we included it in the "taint" flags since
a long time (the ones printed with "systemctl show -p Tainted").

I'd really prefer if we would complain if something we are told to do
cannot be done. However, I think we should try our best to figure out
that what is already in place might already be completely in order, even
if that means that we need to teach tmpfiles to understand when relative
and absolute symlinks are equivalent.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list