summaryrefslogtreecommitdiff
path: root/src/kernel-install/50-depmod.install
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-04-22 03:03:17 +0900
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-21 14:03:17 -0400
commit301fb51922d435d5f5ef02d234dc7a271ecca930 (patch)
tree7a94d2bd1625958c8221b2a7d3ad1bef37cdc373 /src/kernel-install/50-depmod.install
parent320ac7a6276e88c5ff59b0000110ed39f37fe389 (diff)
downloadsystemd-301fb51922d435d5f5ef02d234dc7a271ecca930.tar.gz
kernel-install: remove unneeded modules.* files created by depmod (#5766)
Fixes #5765.
Diffstat (limited to 'src/kernel-install/50-depmod.install')
-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