kernel-install: run depmod only if writeable

This commit is contained in:
Ludwig Nussel
2023-01-05 21:46:09 +01:00
committed by Lennart Poettering
parent a91078bc57
commit dd003f1621
+2
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