summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2019-06-14 12:34:51 +0200
committerUnicronNL <kim.sidney@gmail.com>2019-06-18 19:41:01 +0200
commit7fa3128f6ac3700ae83378a96357a8f4f2211d24 (patch)
tree2e33eeba7597ca8c351e5bb9551fae66064b3f47
parent5037c9e62c2d1df439f5be1a6963b527b59af90c (diff)
downloadlive-boot-7fa3128f6ac3700ae83378a96357a8f4f2211d24.tar.gz
live-boot-7fa3128f6ac3700ae83378a96357a8f4f2211d24.zip
use nested loops instead of an array
-rwxr-xr-xcomponents/9990-misc-helpers.sh20
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/"