diff options
-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 |