summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2019-10-16 14:42:03 +0200
committerJonathan Bauer2019-10-16 14:42:03 +0200
commit6d494189f8b1059011bd53d468f832c98257f961 (patch)
tree15b38a5855c11fb0478670aad0f406f0eee49a0c
parentbuild-initramfs.sh: fix log message (diff)
downloadsystemd-init-6d494189f8b1059011bd53d468f832c98257f961.tar.gz
systemd-init-6d494189f8b1059011bd53d468f832c98257f961.tar.xz
systemd-init-6d494189f8b1059011bd53d468f832c98257f961.zip
[slx-dmsetup] fix encrypted scratch dev name
-rwxr-xr-xbuilder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device4
1 files 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