c56de49a0b
find-free-devnum.fix mapfile-rebuild.fix udev-offroot Fix various issues will installation on IMSM RAID arrays, booting from those arrays, and clean shutdown when such an array is used for '/'. (bnc#752107 bnc#732294 bnc#770351) OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=69
32 lines
902 B
Plaintext
32 lines
902 B
Plaintext
From a99d3469713138f050cccb8657c24a05ffa7057e Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Mon, 20 Aug 2012 10:37:21 +1000
|
|
Subject: [PATCH] mdmon: allow --takeover when original was started with
|
|
--offroot
|
|
|
|
As --offroot causes ARGV[0] to be changed, we need to be more
|
|
lenient when checking that the mdmon we are about to kill really
|
|
is mdmon. i.e. allow name to be "@dmon" instead.
|
|
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
|
|
---
|
|
mdmon.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
--- mdadm-3.2.5.orig/mdmon.c
|
|
+++ mdadm-3.2.5/mdmon.c
|
|
@@ -184,7 +184,11 @@ static void try_kill_monitor(pid_t pid,
|
|
buf[sizeof(buf)-1] = 0;
|
|
close(fd);
|
|
|
|
- if (n < 0 || !strstr(buf, "mdmon"))
|
|
+ /* Note that if started with --offroot, the name
|
|
+ * might be "@dmon"
|
|
+ */
|
|
+ if (n < 0 || !(strstr(buf, "mdmon") ||
|
|
+ strstr(buf, "@dmon")))
|
|
return;
|
|
|
|
kill(pid, SIGTERM);
|