core: when adding names to unit, require matching instance strings
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 27 May 2020 14:39:35 +0000 (16:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 10 Jun 2020 07:42:20 +0000 (09:42 +0200)
commitd383acad25f7f57692f88326e5505e9194ffe6dc
treee06c6e0cbb84b0e6589e5cdaaa7f04b89c5c6697
parent4562c35527c199e1ed9b41d78c0dd81c88c655c9
core: when adding names to unit, require matching instance strings

We would check that the instance is present in both units (or missing in both).
But when it is defined, it should be the same in both. The comment in the code
was explicitly saying that differing instance strings are allowed, but this
mostly seems to be a left-over from old times. The man page is pretty clear:

> the instance (if any) is always uniquely defined for a given unit and all its
> aliases.
src/core/unit.c