File: kmod.initramfs-hook

package info (click to toggle)
kmod 26-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,784 kB
  • sloc: ansic: 15,682; xml: 1,879; makefile: 617; sh: 303; python: 7
file content (16 lines) | stat: -rw-r--r-- 430 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 /bin/kmod
cp -a /sbin/modprobe /sbin/rmmod "$DESTDIR/sbin/"

mkdir -p "$DESTDIR/lib/modprobe.d/"
if [ "$(echo /lib/modprobe.d/*)" != "/lib/modprobe.d/*" ]; then
  cp -a /lib/modprobe.d/* "$DESTDIR/lib/modprobe.d/"
fi