diff options
author | Simon Rettberg | 2021-10-20 15:44:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-10-20 15:44:25 +0200 |
commit | 1c6b16454904cfd7ed2a64524f3f86a8562b677b (patch) | |
tree | c4c77e8bf7397f18c6a71a7fe516514a4c51c804 | |
parent | Simplify cmdline parsing, check qcow handler, don't build unused one (diff) | |
download | systemd-init-1c6b16454904cfd7ed2a64524f3f86a8562b677b.tar.gz systemd-init-1c6b16454904cfd7ed2a64524f3f86a8562b677b.tar.xz systemd-init-1c6b16454904cfd7ed2a64524f3f86a8562b677b.zip |
[dnbd3-rootfs] Accept kernel and xloop, default to xloop
-rwxr-xr-x | modules.d/dnbd3-rootfs/hooks/prepare-root-partition.sh | 14 |
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 |