balena-os / kernel-module-build

Example project for building an OOT kernel module in balena
https://balena.io
MIT License
35 stars 29 forks source link

"load" service doesn't start on device reboot #55

Open dschaub opened 1 year ago

dschaub commented 1 year ago

Hi! I used this as a guide for getting a WiFi adapter driver compiled, and it worked great. The only problem is that the "load" service exits successfully when it's run, so when the balenaOS device reboots it doesn't run again, and won't run again until a new release is created.

I solved the problem by adding a sleep infinity to load.sh, and then changing the service's restart to always, to make sure it gets run at least once per device boot. It's not ideal though because any other failure that causes the container to restart will interrupt the WiFi connection by removing and re-adding the driver module, however unlikely that may be.

Is there another option that I'm not seeing to make sure the "load" service always runs once on boot?

CedricRBR commented 1 year ago

Hi @dschaub Did you find a better solution ?

dschaub commented 1 year ago

Not yet! This is still working well.