]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Monitor: send --test message for arrays in /proc/mdstat that aren't in mdadm.conf
authorNeilBrown <neilb@suse.de>
Thu, 5 Feb 2009 06:06:03 +0000 (17:06 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 5 Feb 2009 06:06:03 +0000 (17:06 +1100)
"mdadm --monitor --test --scan" currently only sends test messages for
arrays listed on the command line or in /etc/mdadm.conf.  With this
patch it also reports on any active arrays, which is more in line with
the description in the manpage.

Thanks to  Andrew Walrond <andrew@walrond.org> for reporting this error.

Signed-off-by: NeilBrown <neilb@suse.de>
Monitor.c

index 2f0fe0cc5353db7cf78c93f2ab7d841448b4b35d..38256000668ded37368993cdf83a8fc390b5c4b3 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -431,6 +431,8 @@ int Monitor(mddev_dev_t devlist,
                                        st->spare_group = NULL;
                                        st->expected_spares = -1;
                                        statelist = st;
+                                       if (test)
+                                               alert("TestMessage", st->devname, NULL, mailaddr, mailfrom, alert_cmd, dosyslog);
                                        alert("NewArray", st->devname, NULL, mailaddr, mailfrom, alert_cmd, dosyslog);
                                        new_found = 1;
                                }