Skip to content

Commit

Permalink
🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 26, 2024
1 parent 767072d commit d97ce24
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_img.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: build headless image

on:
push:
workflow_dispatch:

jobs:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test build no-OVOS headless image

on:
push:
workflow_dispatch:

jobs:
Expand Down
3 changes: 0 additions & 3 deletions autologin.conf

This file was deleted.

11 changes: 8 additions & 3 deletions build_raspOVOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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..."
Expand Down
3 changes: 2 additions & 1 deletion build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d97ce24

Please sign in to comment.