]> git.pld-linux.org Git - packages/mdadm.git/commitdiff
- display errors if --all not used and devices not specified
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 23 Nov 2008 13:09:00 +0000 (13:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mdadm-checkarray -> 1.4

mdadm-checkarray

index 779efedcb6151f503e8c4fa0af465fded4058cbd..fd2a79ab853b639d03ad072bbf0e03bef097051b 100644 (file)
@@ -133,7 +133,12 @@ if [ -z "$(ls /sys/block/md*/md/sync_action 2>/dev/null)" ]; then
   exit 3
 fi
 
-[ $all = 1 ] && arrays="$(ls -d1 /sys/block/md* | cut -d/ -f4)"
+if [ $all = 1 ]; then
+       arrays="$(ls -d1 /sys/block/md* | cut -d/ -f4)"
+elif [ -z "$arrays" ]; then
+       echo "$PROGNAME: E: specify array devices in command line." >&2
+       exit 0
+fi
 
 for array in $arrays; do
   SYNC_ACTION_CTL=/sys/block/$array/md/sync_action
This page took 0.061142 seconds and 4 git commands to generate.