]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/install: ignore enablement of template units w/o instance when presetting 19870/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 9 Jun 2021 16:41:17 +0000 (18:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 10 Jun 2021 08:02:38 +0000 (10:02 +0200)
commitad5fdd391248432e0c105003a8a13f821bde0b8e
tree8c34bdecf9aee8eea874e4274925b9f4358a4ecd
parent9b69770a495a170bd6efd5b0c7a89a3ad093a021
shared/install: ignore enablement of template units w/o instance when presetting

When we have a unit which cannot be enabled:
 # foo@.service:
 ...
 [Install]
 WantedBy=foo.target  # there is no instance, so we don't know what to enable

we should throw an error when invoked directly with 'enable', but
not when doing 'preset' or 'preset-all'.

Fixes #19856.
src/shared/install.c
src/shared/install.h