Can't load custom systemd preset

asked 2017-02-28 06:41:57 -0600

wyup gravatar image

updated 2017-02-28 13:08:51 -0600

I have created a custom '50-mypreset.preset' file in /usr/lib/systemd/system-preset/ along with other system default presets. I try to enforce it issuing 'systemctl preset 50-mypreset.preset' but it says: Failed to preset unit: No such file or directory

if I enter 'systemctl preset /usr/lib/systemd/system-preset/50-mypreset.preset' it says: Failed to preset unit: Invalid argument

my 50-mypreset.preset contains only: disable lvm2-monitor.service

After reboot, it doesn't load the preset since the service is enabled. I have moved it to /etc/systemd/system-preset/ to no avail either. According to docs and other presets it should load with preference according to priority number.

What should I do to enforce my service preset?

edit retag flag offensive close merge delete

Comments

If only contains "disable lvm2-monitor.service" Why do not uses systemctl disable lvm2-monitor.service. When systems reboot does not load this service.

Alvaro Castillo gravatar imageAlvaro Castillo ( 2017-02-28 20:08:42 -0600 )edit

it's an single line file example, I intend to disable a list of services with a preset file. My fedora 25 loads this service by default and I can disable it fine with systemctl, but not with the preset.

wyup gravatar imagewyup ( 2017-03-11 07:10:41 -0600 )edit