From bc5346939c9cc885d94bfc27e0264004ee916491 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Thu, 4 Nov 2021 14:22:06 -0400 Subject: [PATCH] daemon/common_functions.sh: fix shell lint - SC2086 - SC2207 - SC2231 Signed-off-by: Dimitri Savineau (cherry picked from commit 8914ffc56dcebd18d52deebcd458eec0bdf20ec4) --- src/daemon/common_functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/daemon/common_functions.sh b/src/daemon/common_functions.sh index c9574a19f..1b679c6cd 100755 --- a/src/daemon/common_functions.sh +++ b/src/daemon/common_functions.sh @@ -116,7 +116,7 @@ function dev_part { symdir=$(dirname "${osd_device}") local link="" local pfxlen=0 - for option in ${symdir}/*; do + for option in "${symdir}"/*; do [[ -e $option ]] || break if [[ $(readlink -f "$option") == "$desired_partition" ]]; then local optprefixlen @@ -274,7 +274,7 @@ function apply_ceph_ownership_to_disks { fi fi if [[ ${OSD_BLUESTORE} -eq 1 ]]; then - dev_real_path=($(resolve_symlink "$OSD_BLUESTORE_BLOCK_WAL" "$OSD_BLUESTORE_BLOCK_DB")) + mapfile -t dev_real_path < <(resolve_symlink "$OSD_BLUESTORE_BLOCK_WAL" "$OSD_BLUESTORE_BLOCK_DB") for partition in $(list_dev_partitions "$OSD_DEVICE" "${dev_real_path[@]}"); do part_code=$(get_part_typecode "$partition") if [[ "$part_code" == "5ce17fce-4087-4169-b7ff-056cc58472be" || @@ -610,6 +610,6 @@ function dmcrypt_data_map() { fi LOCKBOX_UUID=$(get_part_uuid "${LOCKBOX_PART}") mount_lockbox "${DATA_UUID}" "${LOCKBOX_UUID}" - ceph-disk --setuser ceph --setgroup disk activate --dmcrypt --no-start-daemon ${DATA_PART} || true + ceph-disk --setuser ceph --setgroup disk activate --dmcrypt --no-start-daemon "${DATA_PART}" || true done }