diff mbox series

[isar-cip-core,v5,10/11] fix: Remove spurious '-'

Message ID 20240506141833.3622989-11-Quirin.Gylstorff@siemens.com (mailing list archive)
State Accepted
Headers show
Series Add option to encrypt the rootfs | expand

Commit Message

Quirin Gylstorff May 6, 2024, 2:17 p.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This remove the `-` introduced with cfef8103(initramfs-crypt-hook: Consolidate clevis and systemd scripts) to fix the following error:
```
/scripts/local-top/encrypt_partition: 55: /scripts/local-top/encrypt_partition: -: not found
```

Also set the missing parameter $part_device.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../initramfs-crypt-hook/files/encrypt_partition.script         | 2 +-
 .../initramfs-crypt-hook/files/encrypt_partition.systemd.script | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
index 857b73f..d9a85e5 100644
--- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
+++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
@@ -183,7 +183,7 @@  for partition_set in $partition_sets; do
 		 ;;
 	esac
 
-	finalize_tpm2_encryption
+	finalize_tpm2_encryption "$part_device"
 done
 
 if [ -n "$watchdog_pid" ]; then
diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script
index 611f9cf..1b7c83b 100644
--- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script
+++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script
@@ -52,6 +52,6 @@  prepare_for_encryption() {
 
 finalize_tpm2_encryption() {
 	partition_device="$1"
--	/usr/bin/systemd-cryptenroll --wipe-slot=0 "$partition_device"
+	/usr/bin/systemd-cryptenroll --wipe-slot=0 "$partition_device"
 }