Message ID | 20230814121125.2949305-1-stefan-koch@siemens.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [isar-cip-core] initramfs-crypt-hook: Avoid calling of tiny mke2fs from busybox | expand |
On 14.08.23 14:11, Koch, Stefan (DI PA DCP R&D 3) wrote: > - The tiny mke2fs does not support the used -t option. > - Remove unused script test since variable has default value > > Signed-off-by: Stefan Koch <stefan-koch@siemens.com> > --- > .../files/encrypt_partition.systemd.script | 4 ---- > .../initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb | 2 +- > 2 files changed, 1 insertion(+), 5 deletions(-) > > 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 b32b2f2..5fe2e91 100644 > --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script > +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script > @@ -41,10 +41,6 @@ tpm_device=/dev/tpmrm0 > partition_sets="$PARTITIONS" > create_file_system_cmd="$CREATE_FILE_SYSTEM_CMD" > > -if [ -z "${create_file_system_cmd}" ]; then > - create_file_system_cmd="mke2fs -t ext4" > -fi > - > service_watchdog() { > for n in $(seq $(($SETUP_TIMEOUT / 10)) ); do > printf '\0' > diff --git a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb > index 1c1bf3d..3c3f6bb 100644 > --- a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb > +++ b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb > @@ -32,7 +32,7 @@ SRC_URI += "file://encrypt_partition.env.tmpl \ > CRYPT_PARTITIONS ??= "home:/home:reencrypt var:/var:reencrypt" > # CRYPT_CREATE_FILE_SYSTEM_CMD contains the shell command to create the filesystem > # in a newly formatted LUKS Partition > -CRYPT_CREATE_FILE_SYSTEM_CMD ??= "mke2fs -t ext4" > +CRYPT_CREATE_FILE_SYSTEM_CMD ??= "/usr/sbin/mke2fs -t ext4" > # Timeout for creating / re-encrypting partitions on first boot > CRYPT_SETUP_TIMEOUT ??= "600" > # Watchdog to service during the initial setup of the crypto partitions Strictly spoken, this should have been two patches, but now I merged it already ;). Thanks, Jan
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 b32b2f2..5fe2e91 100644 --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.systemd.script @@ -41,10 +41,6 @@ tpm_device=/dev/tpmrm0 partition_sets="$PARTITIONS" create_file_system_cmd="$CREATE_FILE_SYSTEM_CMD" -if [ -z "${create_file_system_cmd}" ]; then - create_file_system_cmd="mke2fs -t ext4" -fi - service_watchdog() { for n in $(seq $(($SETUP_TIMEOUT / 10)) ); do printf '\0' diff --git a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb index 1c1bf3d..3c3f6bb 100644 --- a/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb +++ b/recipes-initramfs/initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb @@ -32,7 +32,7 @@ SRC_URI += "file://encrypt_partition.env.tmpl \ CRYPT_PARTITIONS ??= "home:/home:reencrypt var:/var:reencrypt" # CRYPT_CREATE_FILE_SYSTEM_CMD contains the shell command to create the filesystem # in a newly formatted LUKS Partition -CRYPT_CREATE_FILE_SYSTEM_CMD ??= "mke2fs -t ext4" +CRYPT_CREATE_FILE_SYSTEM_CMD ??= "/usr/sbin/mke2fs -t ext4" # Timeout for creating / re-encrypting partitions on first boot CRYPT_SETUP_TIMEOUT ??= "600" # Watchdog to service during the initial setup of the crypto partitions
- The tiny mke2fs does not support the used -t option. - Remove unused script test since variable has default value Signed-off-by: Stefan Koch <stefan-koch@siemens.com> --- .../files/encrypt_partition.systemd.script | 4 ---- .../initramfs-crypt-hook/initramfs-crypt-hook_0.1.bb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)