@@ -15,5 +15,5 @@ INITRAMFS_PREINSTALL += " \
# Recipes that should be installed into the initramfs build rootfs.
INITRAMFS_INSTALL += " \
initramfs-isar-example-hook \
- initramfs-fsck-hook-ext4 \
+ initramfs-fsck-ext4-hook \
"
similarity index 100%
rename from meta/recipes-support/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers
rename to meta/recipes-initramfs/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers
new file mode 100644
@@ -0,0 +1,14 @@
+# This software is a part of ISAR.
+# Copyright (C) Siemens AG, 2019-2024
+#
+# SPDX-License-Identifier: MIT
+
+DESCRIPTION = "Recipe to add fsck hook to the initramfs"
+
+require recipes-initramfs/initramfs-hook/hook.inc
+
+SRC_URI += "file://initramfs-fsck-hook-ext4.triggers"
+
+HOOK_COPY_EXECS = "fsck fsck.ext4 logsave"
+
+DEBIAN_DEPENDS .= ", e2fsprogs, logsave"
deleted file mode 100644
@@ -1,39 +0,0 @@
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-
-#!/bin/sh
-
-set -e
-
-PREREQ=""
-
-prereqs()
-{
- echo "$PREREQ"
-}
-
-case $1 in
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-. /usr/share/initramfs-tools/scripts/functions
-. /usr/share/initramfs-tools/hook-functions
-
-if [ ! -x /sbin/fsck ]; then
- echo "Warning: couldn't find /sbin/fsck!"
- exit 0
-fi
-
-copy_exec /sbin/fsck
-copy_exec /sbin/logsave
-
-if prog="$(command -v fsck.ext4)"; then
- copy_exec "$prog"
-else
- echo "Warning: /sbin/fsck.ext4 doesn't exist, can't install to initramfs, ignoring."
-fi
deleted file mode 100644
@@ -1,18 +0,0 @@
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-
-
-DESCRIPTION = "Recipe to add fsck hook to the initramfs"
-
-inherit dpkg-raw
-SRC_URI = "file://initramfs-fsck-hook-ext4.triggers \
- file://initramfs.fsck.ext4.hook \
- "
-
-
-do_install() {
- install -m 0755 -d ${D}/etc/initramfs-tools/hooks
- install -m 0740 ${WORKDIR}/initramfs.fsck.ext4.hook ${D}/etc/initramfs-tools/hooks/fsck.ext4.hook
-}