Ensure loop device partition nodes are created (#741)

Although the loop block device is created before attaching the image
to it, the devices for the partition that the image contains are still
not created. This patch creates those devices as well, when they are
not already available.

Fixes #482

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
This commit is contained in:
Vasilis Tsiligiannis
2024-01-04 13:05:51 +02:00
committed by GitHub
parent 02b371de1a
commit 1377e903b8
3 changed files with 16 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ until ensure_next_loopdev && LOOP_DEV="$(losetup --show --find --partscan "$IMG_
fi
done
ensure_loopdev_partitions "$LOOP_DEV"
BOOT_DEV="${LOOP_DEV}p1"
ROOT_DEV="${LOOP_DEV}p2"