File: prepare-distro-img.sh

package info (click to toggle)
passt 0.0~git20230309.7c7625d-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,448 kB
  • sloc: ansic: 9,696; sh: 2,820; makefile: 334
file content (18 lines) | stat: -rwxr-xr-x 654 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/sh -e

IMG="$1"
PASST_FILES="$(echo ../*.c ../*.h ../*.sh ../*.1 ../Makefile ../README.md)"

virt-edit -a $IMG /lib/systemd/system/serial-getty@.service -e 's/ExecStart=.*/ExecStart=\/sbin\/agetty --autologin root -8 --keep-baud 115200,38400,9600 %I $TERM/g'

guestfish --rw -a $IMG -i <<EOF
rm-f /usr/lib/systemd/system/cloud-config.service
rm-f /usr/lib/systemd/system/cloud-init.service
rm-f /usr/lib/systemd/system/cloud-init-local.service
rm-f /usr/lib/systemd/system/cloud-final.service
rm-f /etc/init.d/cloud-config
rm-f /etc/init.d/cloud-final
rm-f /etc/init.d/cloud-init
rm-f /etc/init.d/cloud-init-local
copy-in $PASST_FILES /root/
EOF