Is there a way to automatically run a script upon booting a device? More specifically, is there a way to bundle said script with the Legato platform installation?
I’m using cURL in my application, and it needs to bind against
/etc/resolv.conf. The issue is that resolv.conf isn’t created until a data connection is established, so my app ends up faulting because there’s nothing to bind to. Then my app can’t establish a data connection as it can’t start in the first place. Bit of a catch-22.
I figured I would just make a shell script that creates a blank resolv.conf which will then get updated when my app establishes a data connection. But, this is for a production device, so I can’t be manually creating init.d scripts; I need it to be automatically added when I install the Legato platform. This is the part I’m stuck on.
Is this possible? Or is there perhaps a better way of reasoning about this problem? Thank you very much in advance for any help/advice!