Skip to content

Commit 6707fe4

Browse files
committed
Merge remote-tracking branch 'origin/main' into development
2 parents 0ce4cb0 + 14ba899 commit 6707fe4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎image-factory/create_image.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ SIZE_MB="$(jq --arg size_mb "${SIZE_MB}" -r '.image_size_mb // $size_mb' "${CONF
8585
# Create empty image
8686
echo "Create empty image:"
8787
dd if=/dev/zero of="${IMAGE}" bs=1M count="${SIZE_MB}"
88+
sync
8889

8990
if [[ "${TARGET}" == "rpi" ]]; then
9091
parted "${IMAGE}" --script \
@@ -108,9 +109,10 @@ else
108109
TARGET_BOOT_PARTITION_NUM=2
109110
TARGET_ROOT_PARTITION_NUM=3
110111
fi
112+
sync
111113

112114
# Setup loop device
113-
LOOPDEV="$(losetup --find --show $IMAGE)"
115+
LOOPDEV="$(losetup --find --show "${IMAGE}")"
114116
partprobe "${LOOPDEV}"
115117

116118
# Map partitions

0 commit comments

Comments
 (0)