Add new template for debian trixie without luks encryption; fix disk resizing on first boot; set default user and ssh keys for cloud init

This commit is contained in:
Philip Henning 2026-05-11 17:50:49 +02:00
parent 775215f230
commit e57f2d977b
19 changed files with 2341 additions and 17 deletions

View file

@ -0,0 +1,25 @@
#! /bin/sed 2,5!d;s/^#.//
# This script must be sourced from within a shell
# and not executed. For instance with:
#
# . /usr/local/bin/initial-setup.sh
# Only run in interactive shells
case $- in
*i*) ;;
*) return ;;
esac
if [ "$EUID" -ne 0 ]; then
if ! command -v sudo >/dev/null 2>&1 || ! sudo -n true >/dev/null 2>&1; then
echo "Error: must be root or have sudo privileges to run initial login setup." >&2
return
fi
fi
SENTINEL="/var/lib/initial-login-setup.done"
if [ ! -f "$SENTINEL" ] && [ -x /usr/local/bin/initial-setup.sh ]; then
sudo touch "$SENTINEL"
sudo /usr/local/bin/initial-setup.sh
fi