From 3952830e5833729c8d0eeaa8fb7db786e08a2c5b Mon Sep 17 00:00:00 2001 From: David Bieber <david810@gmail.com> Date: Fri, 10 May 2024 08:41:13 -0400 Subject: [PATCH] Create account in image --- .github/workflows/build.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 445ffa3..61117b6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -195,16 +195,27 @@ jobs: net.ipv4.ip_forward=1 EOF + systemctl stop userconfig + systemctl disable userconfig + systemctl mask userconfig + - name: Adjust image configuration run: | # Find the boot partition boot_partition=$(sudo blkid | grep -E 'TYPE="vfat"' | grep -i "UEFI" | cut -d: -f1) echo "boot_partition = $boot_partition" - # Enable ssh + # Mount the boot partition sudo mkdir /mnt/efi sudo mount ${boot_partition} /mnt/efi + + # Enable ssh sudo touch /mnt/efi/ssh + + # Set up the default user + echo "pi:$(echo 'raspberry' | openssl passwd -6 -stdin)" > /mnt/efi/userconf.txt + + # Unmount the boot partition sudo umount /mnt/efi - name: Compress the release image