]> git.ipfire.org Git - thirdparty/systemd.git/commit
install: allow instantiated units to be enabled via presets
authorRuixin Bao <rubao@redhat.com>
Tue, 21 Aug 2018 20:40:56 +0000 (20:40 +0000)
committerRuixin Bao <rubao@redhat.com>
Mon, 27 Aug 2018 23:56:24 +0000 (23:56 +0000)
commit4c9565eea534cd233a913c8c21f7920dba229743
treeba5a6ba14ada77ab3336c7106f87e1589edd999f
parent56663345dfb1dd3ff23cac5fbc955aba54477efa
install: allow instantiated units to be enabled via presets

This patch implements https://github.com/systemd/systemd/issues/9421.

The .preset file now is able to take a rule in the format of:(e.g)
enable foo@.service bar0 bar1 bar2

In the above example, when preset-all is called, all three instances of
foo@bar0.service, foo@bar1.service and foo@bar2.service will be enabled.

When preset is called on a single service(e.g: foo@bar1.service), only
the mentioned one(foo@bar1.service) will be enabled.

Tests are added for future regression.
src/shared/install.c
src/test/test-install-root.c