1
0
mirror of https://passt.top/passt synced 2024-06-29 22:42:46 +00:00
passt/test/prepare-distro-img.sh
Stefano Brivio c5f4ba1b1b Makefile: Ugly hack to get a "plain" Markdown version of README
Distribution packages reasonably expect to have a human-readable
Markdown version of the README under /usr/share/doc/, but all we have
right now is a heavily web-oriented version.

Introduce a ugly hack to strip web-oriented parts from the current
README and install it.

It should probably work the other way around: a human-readable README
could be used as a source for the web page. But cgit needs a file
that's in the tree, not something that can be built, and
https://passt.top/ is based on cgit. It should eventually be doable
to work around this in cgit, instead.

Reported-by: Benson Muite <benson_muite@emailplus.org>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
2022-08-20 19:07:12 +02:00

19 lines
654 B
Bash
Executable File

#! /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