Skip to content

Commit

Permalink
core: make sure to restore the control command id, too
Browse files Browse the repository at this point in the history
Fixes: #15356
(cherry picked from commit e9da62b)

Resolves: #1829867
  • Loading branch information
poettering authored and systemd-rhel-bot committed Aug 27, 2020
1 parent 8ad8917 commit 37f2576
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -2703,9 +2703,10 @@ static int service_deserialize_exec_command(Unit *u, const char *key, const char
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.");
Expand Down

0 comments on commit 37f2576

Please sign in to comment.