machinectl: do not escape the unit name (#3554)

Otherwise starting a machine named `foo-bar-baz` will end up in
machinectl attempting to start the service unit
`systemd-nspawn@foo\x2dbar\x2dbaz` instead of
`systemd-nspawn@foo-bar-baz`.
This commit is contained in:
Elias Probst 2016-06-22 17:10:52 +02:00 committed by Lennart Poettering
parent 2787d83c28
commit 1e9707d495

View file

@ -1535,11 +1535,7 @@ static int make_service_name(const char *name, char **ret) {
return -EINVAL;
}
e = unit_name_escape(name);
if (!e)
return log_oom();
r = unit_name_build("systemd-nspawn", e, ".service", ret);
r = unit_name_build("systemd-nspawn", name, ".service", ret);
if (r < 0)
return log_error_errno(r, "Failed to build unit name: %m");