device-mapper-multipath/0016-multipathd-send-STOPPING-1-to-systemd-on-shutdown.patch
DistroBaker 28d3ae407e Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/device-mapper-multipath.git#26a2cd7a3e189bf91263d17bc8a8c449cc043fb0
2021-01-21 16:56:27 +00:00

32 lines
1013 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 15 Sep 2020 10:47:52 +0200
Subject: [PATCH] multipathd: send "STOPPING=1" to systemd on shutdown
Inform systemd that the daemon is shutting down. See sd_notify(3).
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipathd/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 53a22a43..c264351c 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -208,7 +208,9 @@ static void do_sd_notify(enum daemon_status old_state,
if (msg && !safe_sprintf(notify_msg, "STATUS=%s", msg))
sd_notify(0, notify_msg);
- if (new_state == DAEMON_IDLE && !startup_done) {
+ if (new_state == DAEMON_SHUTDOWN)
+ sd_notify(0, "STOPPING=1");
+ else if (new_state == DAEMON_IDLE && !startup_done) {
sd_notify(0, "READY=1");
startup_done = true;
}
--
2.17.2