[systemd-devel] [PATCH] preset-transient

Lennart Poettering lennart at poettering.net
Thu Feb 12 02:49:18 PST 2015


On Thu, 12.02.15 10:46, Dimitri John Ledkov (dimitri.j.ledkov at intel.com) wrote:

> On 11 February 2015 at 20:40, Lennart Poettering <lennart at poettering.net> wrote:
> > On Thu, 05.02.15 16:11, Dimitri John Ledkov (dimitri.j.ledkov at intel.com) wrote:
> >
> >> Some context for this patch.
> >>
> >> I would like to support a new preset model, which has the following properties:
> >>
> >>  - distribution shipped defaults are enabled
> >>  - and are applied to each boot/upgrade
> >>  - without overriding any user configuration
> >>
> >> In many ways it is very similar to existing functionality but not
> >> quite possible to achieve all of the above.
> >>
> >> Thus, I'm introducing a new optional functionality, new unit
> >> configuration directory, and new transient-preset configurations.
> >>
> >> On each boot, if TransientPreset=yes, presets from
> >> /usr/lib/systemd/system-preset-transient/*.preset are applied into
> >> configuration path /run/systemd/system-preset-transient/.
> >
> > Why do we need an option for this? Can't the logic be to do this
> > unconditionally if the /run/systemd/system-preset-transient/ dir
> > exists and is non-empty?
> >
> 
> Well /run/systemd/system-preset-transient/ does not exist on boot, but
> rather created when transient-presets are applied. I guess, it's a
> typo, and you meant /usr/lib/systemd/system-preset-transient dir
> exists and is non-empty. 

Indeed.

> That would be good, however, unlike normal presets it would not give
> the user option to opt-into/opt-out as easily. (With normal presets
> /etc/machine-id is the flag file, which is accessible to the user to
> provision/unprovision, together with any desired overrides in
> /etc/systemd/system-preset/*.preset).

Right, and I don't think theuser should have the change to
opt-in/opt-out of this. This is a distro decision, that's kinda the
point of what I am saying.

> Would it be good if I change this portion of the patch logic as follows:
> * drop all the configure/option flag cruft
> * if /usr/lib/systemd/system-preset-transient/ or
> /etc/systemd/system-preset-transient exist and are not empty - run
> transient presets

Yes.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list