From 6d494189f8b1059011bd53d468f832c98257f961 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 16 Oct 2019 14:42:03 +0200 Subject: [slx-dmsetup] fix encrypted scratch dev name --- builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device b/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device index c0f6a274..1756865e 100755 --- a/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device +++ b/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device @@ -273,7 +273,7 @@ save_partition_info "${scratch_device##*/}" "*" "1" "$scratch_device_size" # encrypt the scratch device, if configured if [ "$crypt" -ne 0 ] && encrypt_device \ "$scratch_device" "${scratch_device##*/}-crypt" "$scratch_device_size"; then - scratch_device="${scratch_device##*/}-crypt" + scratch_device="${scratch_device}-crypt" fi writable_device_allocated="$scratch_device_size" @@ -319,7 +319,7 @@ create_pool() { # create remaining thin volumes modprobe dm-thin-pool || echo "$0: dm-thin-pool load failed, maybe builtin?" # create temporary metadata device - data_block_size=256 + data_block_size=255 # calculate number of sectors needed and check boundaries: metadata_dev_size="$(( 48 * $writable_device_size / $data_block_size / 512 ))" # Min 2MB -> 4096 sectors, max 16GB -> 33554432 sectors -- cgit v1.2.3-55-g7522