fix broken fsck type in initramfs-fsck-hook-ext4

Message ID 66bcebb7-81d4-1e7e-d177-a58cb120815d@siemens.com
State Superseded, archived
Headers show
Series fix broken fsck type in initramfs-fsck-hook-ext4 | expand

Commit Message

Tobias Schaffner Dec. 22, 2022, 3:35 p.m. UTC
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.

(Had to exceptionally send this as attachment)

Comments

Henning Schild Dec. 22, 2022, 4:01 p.m. UTC | #1
Am Thu, 22 Dec 2022 15:35:45 +0000
schrieb "Schaffner, Tobias" <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.

that "type" was also used in the later warning

> (Had to exceptionally send this as attachment)

So you get your chance to send a v2 inline ;)

Henning

Patch

From a6cdc01e5f53a08d3421a6567657b17c7e523800 Mon Sep 17 00:00:00 2001
From: Tobias Schaffner <tobias.schaffner@siemens.com>
Date: Thu, 22 Dec 2022 15:05:31 +0100
Subject: [PATCH] fix broken fsck type in initramfs-fsck-hook-ext4

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        | 4 +---
 1 file changed, 1 insertion(+), 3 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..e07db48 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,12 +26,10 @@  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."
-- 
2.34.1