[v2] fix broken fsck type in initramfs-fsck-hook-ext4

Message ID 20230109083220.365058-1-tobias.schaffner@siemens.com
State Accepted, archived
Headers show
Series [v2] fix broken fsck type in initramfs-fsck-hook-ext4 | expand

Commit Message

Tobias Schaffner Jan. 9, 2023, 8:32 a.m. UTC
From: Tobias Schaffner <tobias.schaffner@siemens.com>

The initramfs-fsck-hook-ext4 script did not copy the fsck binary as the
wrong type variable was used to identify the needed filesystem type.

Set the type to ext4 as the script is ext4 only anyways.

Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
---
 .../initramfs-fsck-hook/files/initramfs.fsck.ext4.hook      | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Uladzimir Bely Jan. 24, 2023, 7:35 a.m. UTC | #1
In mail from понедельник, 9 января 2023 г. 11:32:20 +03 user T. Schaffner 
wrote:
> From: Tobias Schaffner <tobias.schaffner@siemens.com>
> 
> The initramfs-fsck-hook-ext4 script did not copy the fsck binary as the
> wrong type variable was used to identify the needed filesystem type.
> 
> Set the type to ext4 as the script is ext4 only anyways.
> 
> Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
> ---
>  .../initramfs-fsck-hook/files/initramfs.fsck.ext4.hook      | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git
> a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
> b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
> index 23f7c28..1bccc81 100644
> ---
> a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
> +++
> b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
> @@ -26,13 +26,11 @@ if [ ! -x /sbin/fsck ]; then
>  	exit 0
>  fi
> 
> -fsck_types="ext4"
> -
>  copy_exec /sbin/fsck
>  copy_exec /sbin/logsave
> 
> -if prog="$(command -v fsck.${type})"; then
> +if prog="$(command -v fsck.ext4)"; then
>    copy_exec "$prog"
>  else
> -  echo "Warning: /sbin/fsck.${type} doesn't exist, can't install to
> initramfs, ignoring." +  echo "Warning: /sbin/fsck.ext4 doesn't exist,
> can't install to initramfs, ignoring." fi

Applied to next, thanks.

Patch

diff --git a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
index 23f7c28..1bccc81 100644
--- a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
+++ b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook
@@ -26,13 +26,11 @@  if [ ! -x /sbin/fsck ]; then
 	exit 0
 fi
 
-fsck_types="ext4"
-
 copy_exec /sbin/fsck
 copy_exec /sbin/logsave
 
-if prog="$(command -v fsck.${type})"; then
+if prog="$(command -v fsck.ext4)"; then
   copy_exec "$prog"
 else
-  echo "Warning: /sbin/fsck.${type} doesn't exist, can't install to initramfs, ignoring."
+  echo "Warning: /sbin/fsck.ext4 doesn't exist, can't install to initramfs, ignoring."
 fi