summaryrefslogtreecommitdiffstats
path: root/debian/kmod.initramfs-hook
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:03:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:03:56 +0000
commitad07a2b86334c23fe063be97e8dd44e586c324b4 (patch)
treebb0f3e91284adc84f813a6e46867915be34b704f /debian/kmod.initramfs-hook
parentAdding upstream version 31+20240202. (diff)
downloadkmod-ad07a2b86334c23fe063be97e8dd44e586c324b4.tar.xz
kmod-ad07a2b86334c23fe063be97e8dd44e586c324b4.zip
Adding debian version 31+20240202-2.debian/31+20240202-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/kmod.initramfs-hook')
-rw-r--r--debian/kmod.initramfs-hook16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/kmod.initramfs-hook b/debian/kmod.initramfs-hook
new file mode 100644
index 0000000..888b0d3
--- /dev/null
+++ b/debian/kmod.initramfs-hook
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+# Copy the compatibility symlinks until initramfs-tools will be converted
+# to use the kmod program.
+
+if [ "$1" = "prereqs" ]; then exit 0; fi
+
+. /usr/share/initramfs-tools/hook-functions
+
+copy_exec /usr/bin/kmod
+cp -aZ /usr/sbin/modprobe /usr/sbin/rmmod "$DESTDIR/usr/sbin/"
+
+mkdir -p "$DESTDIR/usr/lib/modprobe.d/"
+if [ "$(echo /usr/lib/modprobe.d/*)" != "/usr/lib/modprobe.d/*" ]; then
+ cp -aZ /usr/lib/modprobe.d/* "$DESTDIR/usr/lib/modprobe.d/"
+fi
+