summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-02-05 17:06:03 +1100
committerNeilBrown <neilb@suse.de>2009-02-05 17:06:03 +1100
commitbc8544484fac3ebb1c662c171273e1081f5180d8 (patch)
tree3b776396931177e6089385b458a10c3e6308a2e7 /Monitor.c
parentb47dff6675026053dc574f305df570d79754484e (diff)
downloadmdadm-bc8544484fac3ebb1c662c171273e1081f5180d8.tar.gz
mdadm-bc8544484fac3ebb1c662c171273e1081f5180d8.tar.xz
mdadm-bc8544484fac3ebb1c662c171273e1081f5180d8.zip
Monitor: send --test message for arrays in /proc/mdstat that aren't in mdadm.conf
"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>
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Monitor.c b/Monitor.c
index 2f0fe0c..3825600 100644
--- 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;
}