[systemd-devel] Status of "presets override sysadmin's choices"

Franck Bui fbui at suse.de
Mon Nov 28 17:15:25 UTC 2016


Hi,

I'm resurrecting this subject because it seems that some works
happened around this issue but it seems to have been lost somehow.

The latest work I found is the "preset-transient" one [1], which is in
my understanding about having symlinks created by the preset commands
in /run/systemd/ thus having lower precedence than the symlinks
created by the sysadmin in /etc/systemd/.

Could anybody could give a status on this ?

I also would like to know if the following possibility has been
considered already. It's quite easy in its principle (not sure about
it's implementation though) however I've probably overlooked some
details.

Basically when the user is enabling/disabling a service (via the
"EnableUnitFiles" bus call), this operation would be recorded via a
dedicated preset directive in a preset file located for example in:

   /etc/systemd/system-preset/50-user-preferences.preset

For example if the user does "systemctl enable foo.service", this
opertion would add "enable foo.service" in the dedicated preset
file. A subsequent "systemctl disable foo" would replace the previous
directive with "disable foo.service".

Since the preset file is located in /etc/systemd/systemd-preset,
running "systemd preset foo.service" command would simply restore the
user last preferences and would ignore the distro defaults as they are
now overridden.

It's quite simple and I'm probably missing something here but I prefer
asking just in case.

Thanks for your feedback.


[1]
https://lists.freedesktop.org/archives/systemd-devel/2015-February/028046.html



More information about the systemd-devel mailing list