Fix SC2044.

This commit is contained in:
Darko Poljak 2018-10-05 13:05:01 +02:00
parent 5f8c631e34
commit bf270b6f9c
3 changed files with 9 additions and 3 deletions

View file

@ -25,7 +25,9 @@ mkdir "$__object/files"
# get current UUID's from target_host # get current UUID's from target_host
$__remote_exec "$__target_host" blkid > "$__object/files/blkid" $__remote_exec "$__target_host" blkid > "$__object/files/blkid"
for object in $(find "$__global/object/__install_mount" -type d -name "$__cdist_object_marker"); do find "$__global/object/__install_mount" -type d -name "$__cdist_object_marker" |
while IFS= read -r object
do
device="$(cat "$object/parameter/device")" device="$(cat "$object/parameter/device")"
dir="$(cat "$object/parameter/dir")" dir="$(cat "$object/parameter/dir")"
type="$(cat "$object/parameter/type")" type="$(cat "$object/parameter/type")"

View file

@ -20,7 +20,9 @@
get_type_from_mkfs() { get_type_from_mkfs() {
_device="$1" _device="$1"
for mkfs_object in $(find "$__global/object/__install_mkfs" -type d -name "$__cdist_object_marker"); do find "$__global/object/__install_mkfs" -type d -name "$__cdist_object_marker" |
while IFS= read -r mkfs_object
do
mkfs_device="$(cat "$mkfs_object/parameter/device")" mkfs_device="$(cat "$mkfs_object/parameter/device")"
if [ "$_device" = "$mkfs_device" ]; then if [ "$_device" = "$mkfs_device" ]; then
cat "$mkfs_object/parameter/type" cat "$mkfs_object/parameter/type"

View file

@ -59,7 +59,9 @@ size_to_mb() {
get_objects() { get_objects() {
objects_file=$(mktemp) objects_file=$(mktemp)
for object in $(find "$__global/object/__install_partition_msdos" -type d -name "$__cdist_object_marker"); do find "$__global/object/__install_partition_msdos" -type d -name "$__cdist_object_marker" |
while IFS= read -r object
do
object_device="$(cat "$object/parameter/device")" object_device="$(cat "$object/parameter/device")"
object_minor="$(cat "$object/parameter/minor")" object_minor="$(cat "$object/parameter/minor")"
echo "$object_device $object_minor $object" >> "$objects_file" echo "$object_device $object_minor $object" >> "$objects_file"