diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-01-13 07:50:13 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-01-13 07:50:13 +0100 |
commit | 3e208bb0a0c713e58e5310d282e0382a14f625cd (patch) | |
tree | 1823739821515115eaa7b6dd2f18fdea2d6bb6fd | |
parent | dc3527288d6f82ab60cfbe24efeb0961130901b7 (diff) | |
download | debvm-3e208bb0a0c713e58e5310d282e0382a14f625cd.tar.gz |
debvm-create: add --skip=kernel
-rwxr-xr-x | debvm-create | 20 |
1 files 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<rootfs.ext4>. 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<release>, B<--release>=I<release> @@ -75,6 +75,11 @@ The following tasks may be skipped. =over 4 +=item B<kernel> + +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<packagelists> 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" |