summaryrefslogtreecommitdiff
path: root/debvm-create
diff options
context:
space:
mode:
Diffstat (limited to 'debvm-create')
-rwxr-xr-xdebvm-create20
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"