[systemd-devel] Relative links in tmpfiles.d/etc.conf

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Jan 5 20:01:40 PST 2015


On Sat, Jan 03, 2015 at 12:07:59PM +0100, Umut Tezduyar Lindskog wrote:
> Hi,
> 
> Our /etc is a sym link and due to that all the links created by
> tmpfiles.d/etc.conf are wrong. Is there a reason why the links are
> relative?
They are relative so that if you're looking into a container (or a system
mounted at /sysroot or whaever), the links are resolved to the same file
they would be resolved to if the filesystem was mounted at /.

> I would like to send a patch to either:
> a) Convert the relative links to absolute ones.
That would be a step backward for container use.

> b) Follow the sym link before creating the relative one.
This also seems tricky, since currently the symlink is simply created as 
specified in the configuration file, and the proposed patch would replace
this with a more complicated scheme where the target of the created symlinks
depends on the contents of the filesystem.

Maybe you can simply patch etc.conf to have different paths? (sed -i
comes to mind...)

Zbyszek


More information about the systemd-devel mailing list