summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmodules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh b/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh
index f61bd7fe..e32595dc 100755
--- a/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh
+++ b/modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh
@@ -90,18 +90,18 @@ done
# endregion
# region unpack dnbd3 image
-if ! [[ $SLX_QCOW_HANDLER =~ ^(kernel|xmount)?$ ]]; then
- emergency_shell "Unsupported QCOW handler: $SLX_QCOW_HANDLER" \
- "Use either 'xmount' or 'kernel'."
+if ! [[ $SLX_QCOW_HANDLER =~ ^(kernel|xloop|xmount)?$ ]]; then
+ emergency_shell "Unsupported QCOW handler: $SLX_QCOW_HANDLER" \
+ "Use either 'xmount' or 'xloop'."
fi
if [ -z "$SLX_QCOW_HANDLER" ]; then
- SLX_QCOW_HANDLER="xmount"
- echo "SLX_QCOW_HANDLER='$SLX_QCOW_HANDLER'" >> /etc/openslx
+ SLX_QCOW_HANDLER="xloop"
+ echo "SLX_QCOW_HANDLER='$SLX_QCOW_HANDLER'" >> /etc/openslx
fi
-if [ "$SLX_QCOW_HANDLER" = "kernel" ]; then
+if [[ $SLX_QCOW_HANDLER =~ ^kernel|xloop$ ]]; then
read_only_device="$(container_unpack_xloop "$_dnbd3_dev")"
fi
-if [ -z "$read_only_device" ] || [ "$SLX_QCOW_HANDLER" = "xmount" ]; then
+if [ -z "$read_only_device" ]; then
read_only_device="$(container_unpack_xmount "$_dnbd3_dev")"
fi