summaryrefslogtreecommitdiffstats
path: root/src/kernel-install/50-depmod.install
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel-install/50-depmod.install')
-rw-r--r--src/kernel-install/50-depmod.install17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install
new file mode 100644
index 0000000..88f550a
--- /dev/null
+++ b/src/kernel-install/50-depmod.install
@@ -0,0 +1,17 @@
+#!/bin/bash
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
+# ex: ts=8 sw=4 sts=4 et filetype=sh
+
+[[ $2 ]] || exit 1
+
+case "$1" in
+ add)
+ [[ -d /lib/modules/"$2"/kernel ]] || exit 0
+ exec depmod -a "$2"
+ ;;
+ remove)
+ exec rm -f /lib/modules/"$2"/modules.{alias{,.bin},builtin.bin,dep{,.bin},devname,softdep,symbols{,.bin}}
+ ;;
+ *)
+ exit 0
+esac