diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install index aa2bb31a51..3ce8046e6a 100755 --- a/src/kernel-install/50-depmod.install +++ b/src/kernel-install/50-depmod.install @@ -33,11 +33,12 @@ case "$COMMAND" in exec depmod -a "$KERNEL_VERSION" ;; remove) - [ "$KERNEL_INSTALL_BOOT_ENTRY_TYPE" = "type2" ] || \ - [ "$KERNEL_INSTALL_BOOT_ENTRY_TYPE" = "type1" ] && \ - [ -d "/lib/modules/$KERNEL_VERSION/kernel" ] && \ - echo "Multiple entry types exist, not removing modules.dep or associated files." && \ + if [ -n "$KERNEL_INSTALL_BOOT_ENTRY_TYPE" ] && [ -d "/lib/modules/$KERNEL_VERSION/kernel" ]; then + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ + echo "Multiple entry types may exist, not removing modules.dep or associated files." exit 0 + fi + [ "$KERNEL_INSTALL_VERBOSE" -gt 0 ] && \ echo "Removing /lib/modules/${KERNEL_VERSION}/modules.dep and associated files" exec rm -f \