projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
587266c
)
allow an empty DefaultInstance= in configuration files
author
Jérémy Rosen
<jeremy.rosen@smile.fr>
Fri, 1 Nov 2019 23:03:54 +0000
(
00:03
+0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 19 Nov 2019 10:07:30 +0000
(11:07 +0100)
It is currently possible to override the DefaultInstance via drop-ins but
not remove it completely. Allow to do that by specifying an empty
DefaultInstance=
(cherry picked from commit
b5395600a0b0a4e01f3f50a860547060290aca34
)
src/shared/install.c
patch
|
blob
|
history
diff --git
a/src/shared/install.c
b/src/shared/install.c
index 0724dd96ee72eb43f4bd225abe874c71887db405..17f6f99f29542b0eafbfb99b911e57484be2f47b 100644
(file)
--- a/
src/shared/install.c
+++ b/
src/shared/install.c
@@
-1191,6
+1191,11
@@
static int config_parse_default_instance(
if (r < 0)
return r;
+ if (isempty(printed)) {
+ i->default_instance = mfree(i->default_instance);
+ return 0;
+ }
+
if (!unit_instance_is_valid(printed))
return -EINVAL;