diff options
author | Xiao Ni <xni@redhat.com> | 2019-09-30 13:47:59 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2019-09-30 21:26:44 +0200 |
commit | 8063fd0f9e8abd718bd65928c19bc607cee5acd8 (patch) | |
tree | 8e85f6a05c7f53c39b113e62bcbe367dee082800 /clustermd_tests/func.sh | |
parent | mdadm/md.4: add the descriptions for bitmap sysfs nodes (diff) | |
download | mdadm-8063fd0f9e8abd718bd65928c19bc607cee5acd8.tar.xz mdadm-8063fd0f9e8abd718bd65928c19bc607cee5acd8.zip |
Init devlist as an array
devlist is an string. It will change to an array if there is disk that
is sbd disk. If one device is sbd, it runs devlist=().
This line code changes devlist from a string to an array. If there is
no sbd device, it can't run this line code. So it will still be a string.
The later codes need an array, rather than an string. So init devlist
as an array to fix this problem.
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'clustermd_tests/func.sh')
-rw-r--r-- | clustermd_tests/func.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clustermd_tests/func.sh b/clustermd_tests/func.sh index 642cc966..801d6043 100644 --- a/clustermd_tests/func.sh +++ b/clustermd_tests/func.sh @@ -39,6 +39,9 @@ fetch_devlist() devlist=($(ls /dev/disk/by-path/*$ISCSI_ID*)) fi # sbd disk cannot use in testing + # Init devlist as an array + i='' + devlist=(${devlist[@]#$i}) for i in ${devlist[@]} do sbd -d $i dump &> /dev/null |