aboutsummaryrefslogtreecommitdiffstats
path: root/chapter8/kmod.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chapter8/kmod.sh')
-rw-r--r--chapter8/kmod.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/chapter8/kmod.sh b/chapter8/kmod.sh
index 7a693aa..65e3a5f 100644
--- a/chapter8/kmod.sh
+++ b/chapter8/kmod.sh
@@ -1,3 +1,19 @@
#!/bin/bash
+./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