From c5254d41b425344b8daa662fd58442f505dffbe0 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Sat, 20 Jul 2024 07:40:25 +0200 Subject: [PATCH] Import original pirogue-os hook. This needs to be run within the target system (within a chroot). --- raspberrypi/recipes/pi3-pi4.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 raspberrypi/recipes/pi3-pi4.sh diff --git a/raspberrypi/recipes/pi3-pi4.sh b/raspberrypi/recipes/pi3-pi4.sh new file mode 100644 index 0000000..3d7a54f --- /dev/null +++ b/raspberrypi/recipes/pi3-pi4.sh @@ -0,0 +1,25 @@ +echo "nameserver 1.1.1.1" > /etc/resolv.conf +# Install minimal tools +apt-get update +apt-get install wget sudo avahi-daemon -y +apt-get clean +# Ensure we have the pi user +useradd -s /bin/bash -Gsudo -m pi +usermod -aG plugdev pi +echo "pi:raspberry" | chpasswd +# Disable root login on SSH +mkdir -p /etc/ssh/sshd_config.d/ +echo "PermitEmptyPasswords no" > /etc/ssh/sshd_config.d/pirogue-ssh.conf +echo "PermitRootLogin no" >> /etc/ssh/sshd_config.d/pirogue-ssh.conf +# Force egenerate SSH host keys if exist and enable SSH +rm -f /etc/ssh/ssh_host_* +systemctl enable ssh +# Change the hostname +echo "127.0.0.1 pirogue" >> /etc/hosts +echo "127.0.0.1 pirogue.local pirogue" >> /etc/hosts +echo "::1 pirogue" >> /etc/hosts +echo "::1 pirogue.local pirogue" >> /etc/hosts +echo "pirogue" > /etc/hostname +# Add PTS PPA +wget -O /etc/apt/sources.list.d/pirogue.list https://pts-project.org/debian-12/pirogue.list +wget -O /etc/apt/trusted.gpg.d/pirogue.asc https://pts-project.org/debian-12/Key.gpg