From 3e208bb0a0c713e58e5310d282e0382a14f625cd Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 13 Jan 2023 07:50:13 +0100 Subject: debvm-create: add --skip=kernel --- debvm-create | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/debvm-create b/debvm-create index 541519b..d21fd7b 100755 --- a/debvm-create +++ b/debvm-create @@ -59,7 +59,7 @@ By default, it is written to F. Request additional packages to be installed into the virtual machine image. This option can be specified multiple times and packages can be separated by a comma. Package recommendations are not honoured. -If a linux-image is passed here, it will replace the one selected by default. +If a linux-image is passed here, it will also C<--skip=kernel>. =item B<-r> I, B<--release>=I @@ -75,6 +75,11 @@ The following tasks may be skipped. =over 4 +=item B + +skips installing a linux kernel image. +This can be useful to install a custom kernel or to install a different kernel variant than is selected by default. + =item B reduces the package lists inside the image. @@ -162,6 +167,9 @@ opt_output() { } opt_package() { INCLUDE_PACKAGES="$INCLUDE_PACKAGES,$1" + case "$1" in linux-image*) + opt_skip kernel + ;; esac } opt_release() { SUITE=$1 @@ -278,13 +286,9 @@ case "$ARCHITECTURE" in ;; esac -case ",$INCLUDE_PACKAGES," in - *,linux-image-*) - ;; - *) - INCLUDE_PACKAGES="$INCLUDE_PACKAGES,linux-image$KERNEL_SUFFIX" - ;; -esac +if ! check_skip kernel; then + INCLUDE_PACKAGES="$INCLUDE_PACKAGES,linux-image$KERNEL_SUFFIX" +fi if test -n "$SSHKEY"; then INCLUDE_PACKAGES="$INCLUDE_PACKAGES,openssh-server" -- cgit v1.2.3