diff options
Diffstat (limited to 'bin/debvm-create')
-rwxr-xr-x | bin/debvm-create | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bin/debvm-create b/bin/debvm-create index 392b701..4d26ce9 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -75,6 +75,14 @@ Internally, B<mmdebstrap> creates a tar archive first and converts that to ext2, This option causes the conversion to ext2 and further steps to be skipped and the output image will be a tar archive instead. Such a tar archive is not suitable for being booted by B<debvm-run>. +=item B<initsystem> + +skips installing an init system. +When enabling this option, the resulting image will lack F</sbin/init> and the image will not be bootable by B<debvm-run> unless something else provides that path. +One would specify this option when providing the init system via other means, such as passing C<--include=sysvinit-core> to B<mmdebstrap>. +This option also implies disabling other integrations that depend on it. +At present, this will also skip B<autologin> and B<systemdnetwork>. + =item B<kernel> skips installing a linux kernel image. @@ -231,6 +239,10 @@ check_skip() { esac } +if check_skip initsystem; then + SKIP="${SKIP}autologin,systemdnetwork," +fi + if ! check_skip kernel; then set -- "--customize-hook=$SHARE_DIR/customize-kernel.sh" "$@" fi @@ -246,11 +258,14 @@ set -- \ --verbose \ --variant=apt \ "--format=$MMFORMAT" \ - --include=systemd-sysv \ "--architecture=$ARCHITECTURE" \ '--customize-hook=echo "LABEL=debvm / ext4 defaults 0 1" >"$1/etc/fstab"' \ "$@" +if ! check_skip initsystem; then + set -- --include=systemd-sysv "$@" +fi + # set up a hostname set -- \ "--customize-hook=echo $VMNAME >"'"$1/etc/hostname"' \ |