commit: 3f7e03173a3c257e76ce5d949b2c62b7f9d03829
parent: 87d30823c9f1cf589f2600848e658a1e63e07c60
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 22 Mar 2019 11:08:15 +0100
make-initrd: Remove support for precise kernel version, copy all the modules
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/make-initrd.sh b/make-initrd.sh
@@ -2,8 +2,7 @@
# Copyright 2017-2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# Distributed under the terms of the ISC license
-kv=${1:-$(uname -r)}
-out_base=initramfs-${kv}
+out_base=initramfs-all
elves="lvm busybox blkid lsblk cryptsetup mksh zfs zpool"
WORKDIR="$(pwd)"
@@ -20,11 +19,11 @@ cd "$out_base" || die "Failed: cd $out_base"
mkdir -p usr/bin bin lib dev proc sys newroot etc || die "Failed creating base directories"
ln -s /proc/mounts etc/mtab || die "Failed symlink for /etc/mtab"
-if test -d "/lib/modules/$kv"
+if test -d "/lib/modules"
then
- mkdir -p lib/modules ; cp -pr "/lib/modules/$kv" lib/modules
+ cp -pr "/lib/modules" lib || die "Failed copying kernel modules"
else
- echo "[Warning] “/lib/modules/$kv” doesn’t exist"
+ echo "[Warning] “/lib/modules” doesn’t exist"
fi
mknod -m 600 dev/console c 5 1