diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-11-16 21:49:27 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-11-16 21:49:27 +0100 |
commit | 11884f7ef3235f4be3324e569fa804a07a5336bb (patch) | |
tree | a424ba37ecf0d8b118ffbba2929d61c3cca1a94a /raid-check | |
parent | f7ee8760d8d7eea87cbde9ba68b42bb351090562 (diff) | |
download | bin-11884f7ef3235f4be3324e569fa804a07a5336bb.tar.gz bin-11884f7ef3235f4be3324e569fa804a07a5336bb.tar.xz |
raid-check: allow to run on a single device
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'raid-check')
-rwxr-xr-x | raid-check | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,5 +1,12 @@ -#!/bin/sh +#!/bin/bash + +if (($#>0)); then + for d in "$@"; do + echo check > /sys/block/$d/md/sync_action + done +else + for f in /sys/block/md*/md/sync_action; do + echo check > $f + done +fi -for f in /sys/block/md*/md/sync_action; do - echo check > $f -done |