diff options
author | Kim Hagen <kim.sidney@gmail.com> | 2019-06-14 12:34:51 +0200 |
---|---|---|
committer | Kim Hagen <kim.sidney@gmail.com> | 2019-06-14 12:34:51 +0200 |
commit | 0d42a6a916625b5160c83e93a26ffbb9a68608ed (patch) | |
tree | b75302e4d62bed5137712052193fc5c11e0ea082 /components/9990-misc-helpers.sh | |
parent | 2c8b2d4d1d6dce6e08237cda19ac414720c9bb3c (diff) | |
download | live-boot-0d42a6a916625b5160c83e93a26ffbb9a68608ed.tar.gz live-boot-0d42a6a916625b5160c83e93a26ffbb9a68608ed.zip |
use nested loops instead of an array
Diffstat (limited to 'components/9990-misc-helpers.sh')
-rwxr-xr-x | components/9990-misc-helpers.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/components/9990-misc-helpers.sh b/components/9990-misc-helpers.sh index 87d33da..bb1cf21 100755 --- a/components/9990-misc-helpers.sh +++ b/components/9990-misc-helpers.sh @@ -721,16 +721,16 @@ mount_persistence_media () raid_drives=$(cat /proc/partitions | awk '{ if ($4!="name") { print $4 } }' \ | grep "md" | egrep -v "^$") - disks=() - for raid_drive in $raid_drives; do - disks+=`ls /sys/block/$raid_drive/slaves` - done - - for disk in ${disks[@]}; do - if [ "/dev/${disk}" = "${device}" ] - then - return 1 - fi + for raid_drive in $raid_drives + do + disks=`ls /sys/block/$raid_drive/slaves` + for disk in ${disks} + do + if [ "/dev/${disk}" = "${device}" ] + then + return 1 + fi + done done backing="/live/persistence/" |