diff --git a/man/kernel-install.xml b/man/kernel-install.xml
index 9beff5c4de..118b152ee4 100644
--- a/man/kernel-install.xml
+++ b/man/kernel-install.xml
@@ -321,6 +321,23 @@
+
+
+
+
+
+ Controls the type of entries handled by the command. This is typically useful when multiple types
+ of boot entries with the same kernel version are installed, and only one should be removed. When
+ type1 or type2 is specified, each plugin is invoked with
+ $KERNEL_INSTALL_BOOT_ENTRY_TYPE environment variable with the specified
+ value. When all is specified, the environment variable will not be set.
+ Defaults to all.
+
+
+
+
+
+
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 \
diff --git a/src/kernel-install/kernel-install.c b/src/kernel-install/kernel-install.c
index bcc3d145b3..f17e99004b 100644
--- a/src/kernel-install/kernel-install.c
+++ b/src/kernel-install/kernel-install.c
@@ -1496,17 +1496,17 @@ static int help(void) {
" --boot-path=PATH Path to the $BOOT partition\n"
" --make-entry-directory=yes|no|auto\n"
" Create $BOOT/ENTRY-TOKEN/ directory\n"
+ " --entry-type=type1|type2|all\n"
+ " Operate only on the specified bootloader\n"
+ " entry type\n"
" --entry-token=machine-id|os-id|os-image-id|auto|literal:…\n"
- " Entry token to use for this installation\n"
+ " Entry token to be used for this installation\n"
" --no-pager Do not pipe inspect output into a pager\n"
" --json=pretty|short|off Generate JSON output\n"
" --no-legend Do not show the headers and footers\n"
" --root=PATH Operate on an alternate filesystem root\n"
" --image=PATH Operate on disk image as filesystem root\n"
" --image-policy=POLICY Specify disk image dissection policy\n"
- " --entry-type=type1|type2|all\n"
- " Operate only on the specified bootloader\n"
- " entry type\n"
"\n"
"This program may also be invoked as 'installkernel':\n"
" installkernel [OPTIONS...] VERSION VMLINUZ [MAP] [INSTALLATION-DIR]\n"