Merge pull request #709 from darko-poljak/SC2044

Fix SC2044.
This commit is contained in:
Darko Poljak 2018-10-05 14:58:50 +02:00 committed by GitHub
commit 88d4c8a059
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
$__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")"
dir="$(cat "$object/parameter/dir")"
type="$(cat "$object/parameter/type")"

View file

@ -20,7 +20,9 @@
get_type_from_mkfs() {
_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")"
if [ "$_device" = "$mkfs_device" ]; then
cat "$mkfs_object/parameter/type"

View file

@ -59,7 +59,9 @@ size_to_mb() {
get_objects() {
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_minor="$(cat "$object/parameter/minor")"
echo "$object_device $object_minor $object" >> "$objects_file"