From d97ce2459453d32cff7662b79d4bebaba5d554b0 Mon Sep 17 00:00:00 2001 From: miro Date: Tue, 26 Nov 2024 21:28:04 +0000 Subject: [PATCH] :tada: --- .github/workflows/build_img.yml | 1 + .github/workflows/build_test.yml | 1 - autologin.conf | 3 --- build_raspOVOS.sh | 11 ++++++++--- build_test.sh | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 autologin.conf diff --git a/.github/workflows/build_img.yml b/.github/workflows/build_img.yml index fe896879..0bd0242e 100644 --- a/.github/workflows/build_img.yml +++ b/.github/workflows/build_img.yml @@ -1,6 +1,7 @@ name: build headless image on: + push: workflow_dispatch: jobs: diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 4dc1d4b2..66a23914 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -1,7 +1,6 @@ name: test build no-OVOS headless image on: - push: workflow_dispatch: jobs: diff --git a/autologin.conf b/autologin.conf deleted file mode 100644 index 27b7ceef..00000000 --- a/autologin.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin %u --noclear %I 38400 linux \ No newline at end of file diff --git a/build_raspOVOS.sh b/build_raspOVOS.sh index 0de45b21..bd33a62c 100644 --- a/build_raspOVOS.sh +++ b/build_raspOVOS.sh @@ -31,14 +31,13 @@ if [ "$USER" != "pi" ]; then # 6. don't let raspbian force to change username on first boot echo "Disabling first boot user setup wizard..." - echo "$USER:$NEW_HASHED_PASSWORD" > /boot/userconf.txt - chmod 600 /boot/userconf.txt + echo "$USER:$NEW_HASHED_PASSWORD" > /boot/firmware/userconf.txt + chmod 600 /boot/firmware/userconf.txt # 7. Add the new user to the sudo group echo "Adding $USER to the sudo group..." sed -i "/^sudo:/s/pi/$USER/" /etc/group - echo "User has been renamed, added to sudo group, and password updated." fi @@ -48,6 +47,12 @@ echo "$HOSTNAME" > /etc/hostname # Update /etc/hosts to reflect the new hostname sed -i "s/127.0.1.1.*$/127.0.1.1\t$HOSTNAME/" /etc/hosts +echo "Enabling user auto-login ..." +# the rpi first boot wizard is weird and messes up autologin.conf if we include it... so we do this instead +echo "raspi-config nonint do_boot_behaviour B2" | sudo tee -a /usr/bin/cancel-rename > /dev/null + +echo "Enabling ssh..." +touch /boot/firmware/ssh # Update package list and install necessary tools echo "Updating base system..." diff --git a/build_test.sh b/build_test.sh index 770175b4..32cea92d 100644 --- a/build_test.sh +++ b/build_test.sh @@ -48,7 +48,8 @@ echo "$HOSTNAME" > /etc/hostname sed -i "s/127.0.1.1.*$/127.0.1.1\t$HOSTNAME/" /etc/hosts echo "Enabling user auto-login ..." -raspi-config nonint do_boot_behaviour B2 +# the rpi first boot wizard is weird and messes up autologin.conf if we include it... so we do this instead +echo "raspi-config nonint do_boot_behaviour B2" | sudo tee -a /usr/bin/cancel-rename > /dev/null echo "Enabling ssh..." touch /boot/firmware/ssh