it would complain "too many arguments" when array[] has
few members, it's proper to check whether or not array[0]
is null.
Reported-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Zhilong Liu <zlliu@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
echo
elif [ "$DEVTYPE" == 'loop' -o "$DEVTYPE" == 'disk' ]
then
- if [ ! -z ${array[@]} -a ${#array[@]} -ge 1 ]
+ if [ ! -z "$array" -a ${#array[@]} -ge 1 ]
then
md_disks=($($mdadm -D -Y ${array[@]} | grep "/dev/" | cut -d'=' -f2))
cat /proc/mdstat | grep -q "bitmap"