diff options
| author | jandob | 2016-01-28 14:30:35 +0100 |
|---|---|---|
| committer | jandob | 2016-01-28 14:30:35 +0100 |
| commit | 8c1f00fb7a57f418ba20ac87a67c82e95970db65 (patch) | |
| tree | 74311ab01f99b5d793bb1404b3b9c021926bc170 /builder | |
| parent | fix (diff) | |
| download | systemd-init-8c1f00fb7a57f418ba20ac87a67c82e95970db65.tar.gz systemd-init-8c1f00fb7a57f418ba20ac87a67c82e95970db65.tar.xz systemd-init-8c1f00fb7a57f418ba20ac87a67c82e95970db65.zip | |
fix
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 |
