aboutsummaryrefslogtreecommitdiffstats
path: root/chapter8/kmod.sh
blob: 010f7cb9f673300ade8e45f93c7e7b1106b5a338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
set -e

./configure --prefix=/usr \
            --bindir=/bin \
            --sysconfdir=/etc \
            --with-rootlibdir=/lib \
            --with-xz \
            --with-zstd \
            --with-zlib

make

make -j1 install

for target in depmod insmod lsmod modinfo modprobe rmmod; do
  ln -sfv ../bin/kmod /sbin/"${target}"
done

ln -sfv kmod /bin/lsmod