summaryrefslogtreecommitdiffstats
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorJérémy Rosen <jeremy.rosen@smile.fr>2019-11-02 00:03:54 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-04 13:33:08 +0100
commitb5395600a0b0a4e01f3f50a860547060290aca34 (patch)
tree7e3d1cc169773fa50af6b96768be3c3dbd18a7de /src/shared/install.c
parentman/systemd.net-naming-scheme: fix typo (diff)
downloadsystemd-b5395600a0b0a4e01f3f50a860547060290aca34.tar.xz
systemd-b5395600a0b0a4e01f3f50a860547060290aca34.zip
allow an empty DefaultInstance= in configuration files
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=
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 0724dd96ee..17f6f99f29 100644
--- 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;