From 9026f17907553b42257e9cc26969143795ae0f44 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 11 Jul 2025 11:10:00 +0900 Subject: [PATCH 1/3] kernel-install: do not mix || and && This also slightly updates log message, and make it shown only when verbose mode is enabled. Follow-up for b6d499768394297b1d313cdc72dab0720dc315f6. --- src/kernel-install/50-depmod.install | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 \ From 19d4040d71da15d0a91d0be854e5125fa6042870 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 11 Jul 2025 11:18:09 +0900 Subject: [PATCH 2/3] kernel-install: regroup options in help meesage And slightly updates the description. Follow-up for b6d499768394297b1d313cdc72dab0720dc315f6. --- src/kernel-install/kernel-install.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" From a87b6c2c5a59561d79f40b166b416545449108db Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 11 Jul 2025 11:33:06 +0900 Subject: [PATCH 3/3] man/kernel-install: mention --entry-type= option in the man page Follow-up for b6d499768394297b1d313cdc72dab0720dc315f6. --- man/kernel-install.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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. + + + + + +