diff options
author | Helmut Grohne <helmut@subdivi.de> | 2023-02-23 21:23:48 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2023-02-23 21:25:08 +0100 |
commit | 19663abd61b8bfc1ac3fbbdbf3aeec297bc5316e (patch) | |
tree | d7dead7e705be70c74b8c06d5eb65f0c3de7beca /bin/debvm-create | |
parent | 398fce482e8d8809bcec769155d7adbe913bf1af (diff) | |
download | debvm-19663abd61b8bfc1ac3fbbdbf3aeec297bc5316e.tar.gz |
debvm-create: also support --initsystem=busybox
Reported-by: Johannes Schauer Marin Rodrigues <josch@debian.org>
Diffstat (limited to 'bin/debvm-create')
-rwxr-xr-x | bin/debvm-create | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/debvm-create b/bin/debvm-create index fffa494..89256eb 100755 --- a/bin/debvm-create +++ b/bin/debvm-create @@ -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<--initsystem>=B<systemd> | B<runit> | B<sysv> | B<none> +=item B<--initsystem>=B<systemd> | B<busybox> | B<runit> | B<sysv> | B<none> Select an init system to be used. The default is B<systemd> independently of the Debian release. @@ -75,6 +75,7 @@ The following tasks may be skipped. Skips adding a the customize-autologin.sh to B<mmdebstrap> that configures automatic root login on a serial console and also parses the C<TERM> kernel cmdline and passes it as C<TERM> to B<agetty>. +This is specific to using B<runit>, B<systemd> or B<sysv> as init system. =item B<ext4> @@ -184,10 +185,10 @@ opt_hostname() { } opt_initsystem() { case "$1" in - systemd|sysv|runit|none) + busybox|none|runit|systemd|sysv) ;; *) - die "value for --initsystem must be one of systemd, sysv or none" + die "value for --initsystem must be one of systemd, busybox, none, runit or sysv" ;; esac INITSYSTEM=$1 @@ -284,6 +285,16 @@ set -- \ "$@" case "$INITSYSTEM" in + busybox) + set -- \ + --include=busybox \ + '--customize-hook=ln -s /bin/busybox $1/sbin/init' \ + "$@" + SKIP="${SKIP}autologin," + ;; + none) + SKIP="${SKIP}autologin," + ;; runit) set -- --include=runit-init,passwd "$@" ;; @@ -347,7 +358,7 @@ if ! check_skip usrmerge; then set -- --hook-dir=/usr/share/mmdebstrap/hooks/maybe-merged-usr "$@" fi -if test "$INITSYSTEM" != none && ! check_skip autologin; then +if ! check_skip autologin; then set -- "--customize-hook=$SHARE_DIR/customize-autologin.sh" "$@" fi |