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=
This commit is contained in:
Jérémy Rosen
2019-11-02 00:03:54 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent ce6304f78e
commit b5395600a0

View File

@@ -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;