[systemd-devel] [PATCH 1/3] sysusers: allow separate alternate roots for configs and modifications

Lennart Poettering lennart at poettering.net
Thu Apr 23 08:15:58 PDT 2015


On Thu, 23.04.15 18:09, Ivan Shapovalov (intelfx100 at gmail.com) wrote:

> On 2015-04-23 at 16:48 +0200, Lennart Poettering wrote:
> > On Thu, 23.04.15 17:46, Ivan Shapovalov (intelfx100 at gmail.com) wrote:
> > 
> > > On 2015-04-23 at 14:11 +0200, Lennart Poettering wrote:
> > > > On Thu, 26.02.15 02:46, Ivan Shapovalov (intelfx100 at gmail.com) 
> > > > wrote:
> > > > 
> > > > > This is useful, for example, to create system accounts on an 
> > > > > initramfs
> > > > > using the host's configuration.
> > > > 
> > > > Hmm, but you can already do this, by specifiying the config 
> > > > files on
> > > > the command line, no?
> > > 
> > > Actually, this means duplicating the logic of determining of the
> > > directory list (/usr/lib vs /lib, ...).
> > 
> > True, but it's not *that* complex in that case...
> 
> Not really, because it is then also needed to do priority-overriding
> of the configuration snippets by hand. I would really like to avoid re
> -implementing this logic.
> 
> There is an alternative to bind-mount all configuration directories
> into the destination root, but it's not "atomic" against killing of
> the process (if we get killed in between, stale bind mounts will
> remain). So I won't like to do this either. I'm sure that mkinitcpio
> maintainer in arch will not accept this solution as well.
> 
> Any other options?

Hmm, I don't really see the use for this I must say. That said, I
figure I would accept a patch that adds a new switch
--configuration-root= or so, similar to your original patch, but
leaves --root= as it is right now, and really only adds a new
--configuration-root= that if specified overrides the root directory
otherwise specified for the reading of the configuration files. 

If you add this tmpfiles should probably get something similar, to
make this match up nicely...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list