From fcc6be9ec9d98321c7c987d9d8277c149f2bc1f4 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sat, 7 Jan 2023 21:38:35 +0100
Subject: use more perlpod formatting codes

---
 debvm-create | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'debvm-create')

diff --git a/debvm-create b/debvm-create
index 58094cc..c6f4b5c 100755
--- a/debvm-create
+++ b/debvm-create
@@ -11,7 +11,7 @@ debvm-create - Create a VM image for various Debian releases and architectures
 
 =head1 SYNOPSIS
 
-B<debvm-create> [B<-a> I<architecture>] [B<-h> I<hostname>] [B<-k> I<sshkey>] [B<-m> I<mirror>] [B<-o> I<output>] [B<-p> I<package>] [B<-r> I<release>] [B<-z> I<size_in_GB>] [B<--> I<mmdebstrap options>]
+B<debvm-create> [B<-a> I<architecture>] [B<-h> I<hostname>] [B<-k> F<sshkey>] [B<-m> I<mirror>] [B<-o> F<output>] [B<-p> I<package>] [B<-r> I<release>] [B<-z> I<size_in_GB>] [B<--> I<mmdebstrap options>]
 
 =head1 DESCRIPTION
 
@@ -37,7 +37,7 @@ A suitable kernel image is automatically selected and installed into the image.
 Set the hostname of the virtual machine.
 By default, the hostname is B<testvm>.
 
-=item B<-k> I<sshkey>, B<--sshkey>=I<sshkey>
+=item B<-k> F<sshkey>, B<--sshkey>=F<sshkey>
 
 Install the given ssh public key file into the virtual machine image for the root user.
 This option also causes the ssh server to be installed.
@@ -47,12 +47,12 @@ To connect to the vm, pass a port number to B<debvm-run> with the B<-s> option.
 =item B<-m> I<mirror>, B<--mirror>=I<mirror>
 
 Specify the Debian mirror to be used for downloading packages and to be configured inside the virtual machine image.
-By default, B<http://deb.debian.org/debian> is being used.
+By default, L<http://deb.debian.org/debian> is being used.
 
-=item B<-o> I<output>, B<--output>=I<output>
+=item B<-o> F<output>, B<--output>=F<output>
 
 Specify the file name of the resulting virtual machine image.
-By default, it is written to B<rootfs.ext4>.
+By default, it is written to F<rootfs.ext4>.
 
 =item B<-p> I<package>, B<--package>=I<package>
 
-- 
cgit v1.2.3


From 80b239b821af73f8a74b3694cc116773d37d43d6 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sun, 8 Jan 2023 22:38:09 +0100
Subject: debvm-create: automatically log in on serial getty

---
 debvm-create | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'debvm-create')

diff --git a/debvm-create b/debvm-create
index c6f4b5c..0dc619b 100755
--- a/debvm-create
+++ b/debvm-create
@@ -320,6 +320,11 @@ if test "$DEBVER" -ge 12; then
 	set -- --hook-dir=/usr/share/mmdebstrap/hooks/merged-usr "$@"
 fi
 
+set -- \
+	'--customize-hook=mkdir "$1/etc/systemd/system/serial-getty@.service.d"' \
+	"--customize-hook=sed -n -e '1i[Service]' -e '1iExecStart=' -e 's,^ExecStart=-/sbin/agetty ,&-a root ,p'"' "$1/lib/systemd/system/serial-getty@.service" > "$1/etc/systemd/system/serial-getty@.service.d/autologin.conf"' \
+	"$@"
+
 # suite target mirror
 set -- "$@" "$SUITE" "$IMAGE" "deb $MIRROR $SUITE main"
 
-- 
cgit v1.2.3