summaryrefslogtreecommitdiffstats
path: root/source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch')
-rw-r--r--source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch b/source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch
new file mode 100644
index 000000000..9d8e2d060
--- /dev/null
+++ b/source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch
@@ -0,0 +1,26 @@
+--- ./mkinitrd.orig 2023-11-20 12:49:33.502016341 -0600
++++ ./mkinitrd 2023-11-20 12:50:30.142017608 -0600
+@@ -60,6 +60,8 @@
+ # Modified by Piter Punk <piterpunk@slackware.com> 25 April 2022
+ # Add support to specify additional filesystems to be mounted by
+ # initrd. Useful for those that have a separated '/usr'
++# Modified by Patrick Volkerding <volkerdi@slackware.com> 20 Movember 2023
++# Add jfs/xfs repair tools if used for $ROOTFS
+
+ MKINITRD_VERSION=1.4.11
+
+@@ -773,10 +775,11 @@
+ /sbin/modprobe --set-version $kver --show-depends --ignore-install $MODULE 2>/dev/null \
+ | grep "^insmod " | cut -f 2 -d ' ' | while read SRCMOD; do
+
+- # If jfs or xfs filesystems are in use, add the repair tools to the initrd:
+- if [ "$(basename $SRCMOD .ko)" = "jfs" ]; then
++ # If the root filesystem is jfs, add the repair tools to the initrd:
++ if [ "$ROOTFS" = "jfs" ]; then
+ cp -a /sbin/jfs_fsck $SOURCE_TREE/sbin/
+- elif [ "$(basename $SRCMOD .ko)" = "xfs" ]; then
++ # If the root filesystem is xfs, add the repair tools to the initrd:
++ elif [ "$ROOTFS" = "xfs" ]; then
+ cp -a /sbin/xfs_repair $SOURCE_TREE/sbin/
+ fi
+