summaryrefslogtreecommitdiffstats
path: root/source/a/mkinitrd/mkinitrd
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/mkinitrd/mkinitrd')
-rw-r--r--source/a/mkinitrd/mkinitrd14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/a/mkinitrd/mkinitrd b/source/a/mkinitrd/mkinitrd
index 6f4ff3c19..7f921e3bd 100644
--- a/source/a/mkinitrd/mkinitrd
+++ b/source/a/mkinitrd/mkinitrd
@@ -53,6 +53,10 @@
# output filename. Thanks to SeB.
# Modified by Patrick Volkerding <volkerdi@slackware.com> 04 Feb 2019
# Allow specifying more than one kernel version.
+# Modified by Robby Workman <rworkman@slackware.com> 05 September 2019
+# to add libargon2 and libgcc_s for cryptsetup LUKS2 support; add
+# jfs and xfs repair tools to initrd if those filesystems are used;
+# fixes and enhancements to docs
MKINITRD_VERSION=1.4.11
@@ -620,6 +624,9 @@ if [ ! -z "$CRYPT" ]; then
if [ -e /usr/sbin/cryptsetup ]; then
mkdir -p $SOURCE_TREE/sbin
cp /usr/sbin/cryptsetup $SOURCE_TREE/sbin/cryptsetup
+ find /lib /lib64 /usr/lib /usr/lib64 -name "libargon2*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
+ find /lib /lib64 /usr/lib /usr/lib64 -name "libgcc_s*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
+ MODULE_LIST="${MODULE_LIST}:algif_skcipher"
if [ ! -e $SOURCE_TREE/sbin/udevadm ]; then
cat << EOF > $SOURCE_TREE/sbin/udevadm
#!/bin/sh
@@ -733,6 +740,13 @@ if [ ! -z "$MODULE_LIST" ]; then
/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
+ cp -a /sbin/jfs_fsck $SOURCE_TREE/sbin/
+ elif [ "$(basename $SRCMOD .ko)" = "xfs" ]; then
+ cp -a /sbin/xfs_repair $SOURCE_TREE/sbin/
+ fi
+
if ! grep -Eq " $(basename $SRCMOD .ko)(\.| |$)" $SOURCE_TREE/load_kernel_modules 2>/dev/null ; then
LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.gz} .ko)" )"