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 bc22867 commit 767072d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ if [ "$USER" != "pi" ]; then
echo "$USER:$NEW_HASHED_PASSWORD" > /boot/firmware/userconf.txt
chmod 600 /boot/firmware/userconf.txt

echo "Enabling ssh..."
touch /boot/firmware/.ssh

# 7. Add the new user to the sudo group
echo "Adding $USER to the sudo group..."
sed -i "/^sudo:/s/pi/$USER/" /etc/group
Expand All @@ -51,9 +48,10 @@ echo "$HOSTNAME" > /etc/hostname
sed -i "s/127.0.1.1.*$/127.0.1.1\t$HOSTNAME/" /etc/hosts

echo "Enabling user auto-login ..."
mkdir -p /etc/systemd/system/[email protected]
cp -v /mounted-github-repo/autologin.conf /etc/systemd/system/[email protected]/autologin.conf
sed -i 's/%u/\$USER/g' /etc/systemd/system/[email protected]/autologin.conf
raspi-config nonint do_boot_behaviour B2

echo "Enabling ssh..."
touch /boot/firmware/ssh

# Update package list and install necessary tools
echo "Updating base system..."
Expand Down

0 comments on commit 767072d

Please sign in to comment.