diff options
Diffstat (limited to 'builder')
| -rwxr-xr-x | builder/dnbd3-rootfs/hooks/prepare-root-partition.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh index c05ebffb..b9355cc3 100755 --- a/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh +++ b/builder/dnbd3-rootfs/hooks/prepare-root-partition.sh @@ -38,8 +38,10 @@ fi # endregion # region scan partitions read_only_device="" -if qemu-img info --output json "$SLX_DNBD3_DEVICE" | grep '"format": "raw"' +if ! qemu-img info --output json "$SLX_DNBD3_DEVICE" | grep '"format": "raw"' then + read_only_device="$(container-unpack-xmount $SLX_DNBD3_DEVICE)" +else # workaround to detect partitions on raw disks # can be omited when the dnbd3 kernel module supports it (like the nbd # kernel module with parameter 'max_part') @@ -48,8 +50,6 @@ then read_only_device="$loop_device" touch $read_only_device udevadm settle -else - read_only_device="$(container-unpack-xmount $SLX_DNBD3_DEVICE)" fi # endregion |
