File: kmod.initramfs-hook

package info (click to toggle)
kmod 23-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,524 kB
  • ctags: 1,705
  • sloc: ansic: 14,537; xml: 1,848; makefile: 593; sh: 214; python: 7
file content (16 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (2)
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