summaryrefslogtreecommitdiffstats
path: root/builder
diff options
context:
space:
mode:
authorjandob2016-01-28 14:30:35 +0100
committerjandob2016-01-28 14:30:35 +0100
commit8c1f00fb7a57f418ba20ac87a67c82e95970db65 (patch)
tree74311ab01f99b5d793bb1404b3b9c021926bc170 /builder
parentfix (diff)
downloadsystemd-init-8c1f00fb7a57f418ba20ac87a67c82e95970db65.tar.gz
systemd-init-8c1f00fb7a57f418ba20ac87a67c82e95970db65.tar.xz
systemd-init-8c1f00fb7a57f418ba20ac87a67c82e95970db65.zip
fix
Diffstat (limited to 'builder')
-rwxr-xr-xbuilder/dnbd3-rootfs/hooks/prepare-root-partition.sh6
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