dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
bd1529
From 37f2576684d7494c916fd1f13275982f3c43f44f Mon Sep 17 00:00:00 2001
bd1529
From: Lennart Poettering <lennart@poettering.net>
bd1529
Date: Wed, 22 Apr 2020 20:34:02 +0200
bd1529
Subject: [PATCH] core: make sure to restore the control command id, too
bd1529
bd1529
Fixes: #15356
bd1529
(cherry picked from commit e9da62b18af647bfa73807e1c7fc3bfa4bb4b2ac)
bd1529
bd1529
Resolves: #1829867
bd1529
---
bd1529
 src/core/service.c | 5 +++--
bd1529
 1 file changed, 3 insertions(+), 2 deletions(-)
bd1529
bd1529
diff --git a/src/core/service.c b/src/core/service.c
bd1529
index 89b41f6783..7cff419e4e 100644
bd1529
--- a/src/core/service.c
bd1529
+++ b/src/core/service.c
bd1529
@@ -2703,9 +2703,10 @@ static int service_deserialize_exec_command(Unit *u, const char *key, const char
bd1529
                                 break;
bd1529
         }
bd1529
 
bd1529
-        if (command && control)
bd1529
+        if (command && control) {
bd1529
                 s->control_command = command;
bd1529
-        else if (command)
bd1529
+                s->control_command_id = id;
bd1529
+        } else if (command)
bd1529
                 s->main_command = command;
bd1529
         else
bd1529
                 log_unit_warning(u, "Current command vanished from the unit file, execution of the command list won't be resumed.");