Skip to content

Commit

Permalink
Don't wait for online in (#44)
Browse files Browse the repository at this point in the history
With PhotonVision/photonvision#1672, the network
handling is more robust. It should be OK to not wait for NetworkManager
to detect online during the boot process. This will speed bootup,
especially first boot if the system isn't connected to a network.
  • Loading branch information
crschardt authored Jan 4, 2025
1 parent b9b2e92 commit d9bcb56
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions install_opi5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,16 @@ cp -f ./OPi5_CIDATA/user-data /boot/user-data

# modify photonvision.service to enable big cores
sed -i 's/# AllowedCPUs=4-7/AllowedCPUs=4-7/g' /lib/systemd/system/photonvision.service

# modify photonvision.service to wait for the network before starting
# this helps ensure that photonvision detects the network the first time it starts
# but it may cause a startup delay if the coprocessor isn't connected to a network
sed -i '/Description/aAfter=network-online.target' /lib/systemd/system/photonvision.service
cp -f /lib/systemd/system/photonvision.service /etc/systemd/system/photonvision.service
chmod 644 /etc/systemd/system/photonvision.service
cat /etc/systemd/system/photonvision.service

# networkd isn't being used, this causes an unnecessary delay
systemctl disable systemd-networkd-wait-online.service

# PhotonVision server is managing the network, so it doesn't need to wait for online
systemctl disable NetworkManager-wait-online.service

# the bluetooth service isn't needed and causes problems with cloud-init
# the chip has different names on different boards. Examples are:
# OrangePi5: ap6275p-bluetooth.service
Expand Down

0 comments on commit d9bcb56

Please sign in to comment.