]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.c
platform-intel - cache 'intel_devices' for a few seconds.
[thirdparty/mdadm.git] / mdmon.c
diff --git a/mdmon.c b/mdmon.c
index 294cd72c56922537d4a4f47f7a19b908c3b76c1d..5d5ae94e372105f7f4a3c2879b87143b5b38c6df 100644 (file)
--- a/mdmon.c
+++ b/mdmon.c
@@ -184,7 +184,11 @@ static void try_kill_monitor(pid_t pid, char *devname, int sock)
        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);
@@ -299,7 +303,7 @@ int main(int argc, char *argv[])
                {NULL, 0, NULL, 0}
        };
 
-       while ((opt = getopt_long(argc, argv, "th", options, NULL)) != -1) {
+       while ((opt = getopt_long(argc, argv, "tha", options, NULL)) != -1) {
                switch (opt) {
                case 'a':
                        container_name = argv[optind-1];