diff options
author | Luca Boccassi <bluca@debian.org> | 2022-11-07 16:28:33 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2022-11-07 22:30:07 +0100 |
commit | cda4d00dfcbcd075cef95341f8a466f0c4ee8e1d (patch) | |
tree | 7c64aaac2b60a4dc759a02831451bf3229d251cb /src | |
parent | 1824d3d6ccdc7de6dd8e4167c3c66a378cf8585a (diff) | |
download | systemd-cda4d00dfcbcd075cef95341f8a466f0c4ee8e1d.tar.gz |
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
Diffstat (limited to 'src')
-rwxr-xr-x | src/kernel-install/50-depmod.install | 1 |
1 files changed, 1 insertions, 0 deletions
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" ;; |