From 04d29e1c903cba5bfbf9b326e7927e44e8b2d782 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 21 Dec 2022 13:57:47 +0100 Subject: [PATCH] kernel-install: run depmod only if writeable (cherry picked from commit dd003f1621967f114a6a808bb1f729386dc3a154) (cherry picked from commit 8ec0142c1345d86e2b169ebb80ae49f40610a778) --- src/kernel-install/50-depmod.install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install index 61afdd4e9c..d543012b7b 100644 --- a/src/kernel-install/50-depmod.install +++ b/src/kernel-install/50-depmod.install @@ -21,6 +21,8 @@ COMMAND="$1" KERNEL_VERSION="$2" +[ -w "/lib/modules" ] || exit 0 + case "$COMMAND" in add) [ -d "/lib/modules/$KERNEL_VERSION/kernel" ] || exit 0