summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kernel-install/50-depmod.install12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install
index 68c24bed7a..56925c8a5d 100644
--- a/src/kernel-install/50-depmod.install
+++ b/src/kernel-install/50-depmod.install
@@ -2,7 +2,15 @@
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
-[[ $1 == "add" ]] || exit 0
[[ $2 ]] || exit 1
-exec depmod -a "$2"
+case "$1" in
+ add)
+ 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