7ac2029267
* switch 3.12 back to tiny-ec2-bootstrap (tiny-cloud requires ifupdown-ng) * restrict cloud-init to 3.15+ * pad UEFI firmware so QEMU works with aarch64 again * kinda fix motd release_notes (more to do yet)
22 lines
581 B
Bash
Executable File
22 lines
581 B
Bash
Executable File
#!/bin/sh -eu
|
|
# vim: ts=4 et:
|
|
|
|
[ -z "$DEBUG" ] || [ "$DEBUG" = 0 ] || set -x
|
|
|
|
TARGET=/mnt
|
|
|
|
einfo() {
|
|
printf '\n\033[1;7;36m> %s <\033[0m\n' "$@" >&2 # bold reversed cyan
|
|
}
|
|
|
|
if [ "$VERSION" = "3.12" ]; then
|
|
# tiny-cloud-network requires ifupdown-ng, not in 3.12
|
|
einfo "Configuring Tiny EC2 Bootstrap..."
|
|
echo "EC2_USER=$IMAGE_LOGIN" > /etc/conf.d/tiny-ec2-bootstrap
|
|
else
|
|
einfo "Configuring Tiny Cloud..."
|
|
sed -i.bak -Ee "s/^#?CLOUD_USER=.*/CLOUD_USER=$IMAGE_LOGIN/" \
|
|
"$TARGET"/etc/conf.d/tiny-cloud
|
|
rm "$TARGET"/etc/conf.d/tiny-cloud.bak
|
|
fi
|