1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-08 20:58:20 +03:00

kernel-install: run depmod only if writeable

(cherry picked from commit dd003f1621967f114a6a808bb1f729386dc3a154)
This commit is contained in:
Ludwig Nussel 2022-12-21 13:57:47 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent e52b71dd0c
commit 8ec0142c13

View File

@ -23,6 +23,8 @@ set -e
COMMAND="${1:?}"
KERNEL_VERSION="${2:?}"
[ -w "/lib/modules" ] || exit 0
case "$COMMAND" in
add)
[ -d "/lib/modules/$KERNEL_VERSION/kernel" ] || exit 0