core: make sure to restore the control command id, too

Fixes: #15356
This commit is contained in:
Lennart Poettering
2020-04-22 20:34:02 +02:00
parent 5b99bd5fd4
commit e9da62b18a

View File

@@ -2834,9 +2834,10 @@ static int service_deserialize_exec_command(
break;
}
if (command && control)
if (command && control) {
s->control_command = command;
else if (command)
s->control_command_id = id;
} else if (command)
s->main_command = command;
else
log_unit_warning(u, "Current command vanished from the unit file, execution of the command list won't be resumed.");