summaryrefslogtreecommitdiff
path: root/debian/checkarray
diff options
context:
space:
mode:
authormadduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464>2006-07-22 17:19:35 +0000
committermadduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464>2006-07-22 17:19:35 +0000
commit59ab80c4e892d2c0537f3ef6dc929b3cb2c7357d (patch)
tree068140b83395946a779d96d8c953d128fb50adb6 /debian/checkarray
parent79990c642218a966d9810e2cecc69793ccc4e30a (diff)
* Check for presence of active RAID arrays and give an appropriate error if
there are none present (closes: #379019).
Diffstat (limited to 'debian/checkarray')
-rw-r--r--debian/checkarray5
1 files changed, 5 insertions, 0 deletions
diff --git a/debian/checkarray b/debian/checkarray
index f2c60c6e..fdee489c 100644
--- a/debian/checkarray
+++ b/debian/checkarray
@@ -91,6 +91,11 @@ if [ ! -f /proc/mdstat ]; then
exit 2
fi
+if [ -z "$(ls /sys/block/md* 2>/dev/null)" ]; then
+ [ $quiet -lt 2 ] && echo "$PROGNAME: E: no active RAID arrays found." >&2
+ exit 5
+fi
+
if [ -z "$(ls /sys/block/md*/md/sync_action 2>/dev/null)" ]; then
[ $quiet -lt 2 ] && echo "$PROGNAME: E: no kernel support for parity checks." >&2
exit 3