projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce6304f
)
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>
Mon, 4 Nov 2019 12:33:08 +0000
(13:33 +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=
src/shared/install.c
patch
|
blob
|
history
diff --git
a/src/shared/install.c
b/src/shared/install.c
index
0724dd9
..
17f6f99
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;