dryang / rpms / systemd

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