From 16edd880b8d677445c9d8041a5d0b9dc4daf9b61 Mon Sep 17 00:00:00 2001 From: Stephen Just Date: Sat, 20 Jul 2024 11:00:58 -0700 Subject: [PATCH 1/6] Add link-local network fallback --- install_opi5.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/install_opi5.sh b/install_opi5.sh index 8c5f004..09b47ae 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -39,6 +39,28 @@ apt-get install -y libc6 libstdc++6 # renderer: NetworkManager # EOF +cat > /etc/NetworkManager/system-connections/fallback-link-local.nmconnection < Date: Sat, 20 Jul 2024 11:26:27 -0700 Subject: [PATCH 2/6] Set default shell to bash --- install_opi5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_opi5.sh b/install_opi5.sh index 09b47ae..d0f4374 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -4,7 +4,7 @@ if id "$1" >/dev/null 2>&1; then echo 'user found' else echo "creating pi user" - useradd pi -b /home + useradd pi -b /home -s /usr/bin/bash usermod -a -G sudo pi mkdir /home/pi chown -R pi /home/pi From ec7b037e3274d712a0f242456c4b290401f4cbf6 Mon Sep 17 00:00:00 2001 From: Stephen Just Date: Sat, 20 Jul 2024 11:45:41 -0700 Subject: [PATCH 3/6] Don't ask for password on sudo for pi user --- install_opi5.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install_opi5.sh b/install_opi5.sh index d0f4374..7f7ce37 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -8,6 +8,9 @@ else usermod -a -G sudo pi mkdir /home/pi chown -R pi /home/pi + # Don't ask for password on sudo for pi user, as on Raspberry Pi + echo 'pi ALL=(ALL) NOPASSWD: ALL' | tee -a /etc/sudoers.d/010_pi-nopasswd + chmod 0440 /etc/sudoers.d/010_pi-nopasswd fi echo "pi:raspberry" | chpasswd From 5958105c961776a234d690669d6cd1dddde8ffda Mon Sep 17 00:00:00 2001 From: Stephen Just Date: Sat, 20 Jul 2024 11:49:34 -0700 Subject: [PATCH 4/6] Update install_opi5.sh --- install_opi5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_opi5.sh b/install_opi5.sh index 7f7ce37..55ad3c3 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -9,7 +9,7 @@ else mkdir /home/pi chown -R pi /home/pi # Don't ask for password on sudo for pi user, as on Raspberry Pi - echo 'pi ALL=(ALL) NOPASSWD: ALL' | tee -a /etc/sudoers.d/010_pi-nopasswd + echo 'pi ALL=(ALL) NOPASSWD: ALL' | tee -a /etc/sudoers.d/010_pi-nopasswd >/dev/null chmod 0440 /etc/sudoers.d/010_pi-nopasswd fi echo "pi:raspberry" | chpasswd From b0aec2c161c957eb8cdce592d3e4fa7bbf6d0e1b Mon Sep 17 00:00:00 2001 From: Stephen Just Date: Sat, 20 Jul 2024 13:12:13 -0700 Subject: [PATCH 5/6] Update install_opi5.sh --- install_opi5.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install_opi5.sh b/install_opi5.sh index 55ad3c3..83efce6 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -37,10 +37,13 @@ apt-get install -y network-manager net-tools libatomic1 apt-get install -y libc6 libstdc++6 -# cat > /etc/netplan/00-default-nm-renderer.yaml < /etc/netplan/00-default-nm-renderer.yaml < /etc/NetworkManager/system-connections/fallback-link-local.nmconnection < Date: Sat, 20 Jul 2024 13:43:27 -0700 Subject: [PATCH 6/6] Enable networkmanager in image --- install_opi5.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/install_opi5.sh b/install_opi5.sh index 83efce6..791c801 100755 --- a/install_opi5.sh +++ b/install_opi5.sh @@ -20,7 +20,7 @@ chmod +x install.sh sed -i 's/# AllowedCPUs=4-7/AllowedCPUs=4-7/g' install.sh -./install.sh -n -q +./install.sh -m -q rm install.sh @@ -37,14 +37,7 @@ apt-get install -y network-manager net-tools libatomic1 apt-get install -y libc6 libstdc++6 -# Use NetowrkManager to support fallback to a link-local IP if not connected to a network with DHCP -cat > /etc/netplan/00-default-nm-renderer.yaml < /etc/NetworkManager/system-connections/fallback-link-local.nmconnection <