diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install index d4b991cfd6..43bd87c7ed 100755 --- a/src/kernel-install/50-depmod.install +++ b/src/kernel-install/50-depmod.install @@ -26,6 +26,7 @@ KERNEL_VERSION="${2:?}" case "$COMMAND" in add) [ -d "/lib/modules/$KERNEL_VERSION/kernel" ] || exit 0 + command -v depmod >/dev/null || exit 0 [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && echo "+depmod -a $KERNEL_VERSION" exec depmod -a "$KERNEL_VERSION" ;;