From: Luca Boccassi Date: Mon, 7 Nov 2022 16:28:33 +0000 (+0000) Subject: kernel-install: skip 50-depmod if depmod is not available X-Git-Tag: v253-rc1~580 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cda4d00dfcbcd075cef95341f8a466f0c4ee8e1d;p=thirdparty%2Fsystemd.git kernel-install: skip 50-depmod if depmod is not available Images might be built without any kernel module, and without installing depmod as it is not needed. Skip it. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023607 --- diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install index d4b991cfd62..43bd87c7eda 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" ;;