kernel-install: several follow-ups for --entry-type= (#38160)

Follow-ups for b6d4997683 (#37897).
This commit is contained in:
Yu Watanabe
2025-07-11 20:07:19 +09:00
committed by GitHub
3 changed files with 26 additions and 8 deletions
+5 -4
View File
@@ -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 \
+4 -4
View File
@@ -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"