[systemd-devel] [RFC] Preset Files

Lennart Poettering lennart at poettering.net
Wed Jul 6 13:41:52 PDT 2011


On Wed, 06.07.11 10:31, Bill Nottingham (notting at redhat.com) wrote:

> 
> Michal Schmidt (mschmidt at redhat.com) said: 
> > On Wed, 6 Jul 2011 00:42:25 +0200 Lennart Poettering wrote:
> > > Actually, I do want a way how people can reset all service enable
> > > states to what the vendor intended. And that should be "systemctl
> > > preset" without arguments I believe.
> > 
> > That would be too easy to run accidentally.
> > 
> > They can run:
> > cd /lib/systemd/system && systemctl preset *.service
> > or require an extra parameter, e.g.:
> > systemctl preset --all
> 
> I agree here - having some extra argument  (--all, --force) to do the
> global reset seems like a safe default to avoid accidents.
> 
> Some comments in general:
> 
> - Doing globbing matching in the config file may have unintended
> consequences depending on how services are named, if they share a
> common prefix. However, I suspect most globs would only be '*',
> '*', so probably not an issue in practice.
> 
> - If we go down the road of having spin-specific preset files, this
> will lead to conflicts for the people that install multiple desktops;
> there needs to be some way to adjudicate these, or design the installation
> process so that someone who wants both KDE and GNOME doesn't have their
> installation stuck. Maybe have a simple way to package non-conflicting
> presets, and then 'apply' them.

Hmm, I thought KDE and GNOME these days would use pretty much the same
set of system services. Also, on Fedora "disable *" would presumably be
the default, and I'd gues the different guests would add addition
"enable" lines, but not additional "disable" lines, and hence we should
be relatively safe?

> - (bikeshed) 'preset' vs 'reset' (or 'apply-preset') as the command

Hmm, "preset" is not a verb, is that what you are saying?

> - There's a bit of overlap with the snapshot code, as someone may want
> to snapshot the system's current state as their preset.

Snapshots/targets and presets are on a different level really. If I
activate a snapshot i start/stop services. if I apply a preset I
however enable/disable services.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list