I've followed this guide to get a 4G hat networked with my pi zero, and everything seems fine. I'm able to ping out once pon has started in the background and a route has been added.
What I want is for the pi to boot and for pon to be running already, and the route to be already added.
I'm currently doing this in the rc.local file, but I'm pretty sure it's quite a dirty approach:
sleep 20
sudo pon &
sleep 20
sudo route add -net "0.0.0.0" ppp0
exit 0
Ultimately, I want to be sure that the network is up on the newly defined ppp0 route before executing any python.
I've had a look at this similar question but unsure of the correct approach: could this be done with pre-up.d or some kind of interfaces change?
Any help would be greatly appreciated.