I shipped a bunch of devices with the wrong connection files in the resin-data partition.
To hack them into working with new connections in the field, I found where all the connection file live:
find / -name "resin-wifi-01"
3 things will show up:
where things are running from now linked with the one below
where you can edit things, seem like this is
-where things are loaded when you flash it in person, and I wish I could put them in the field
Then I was just let shove some files in there and see what happens with:
blah blah blah sercrets sssssshhhhhhhhhhh
" >> /mnt/state/root-overlay/etc/NetworkManager/system-connections/client_connection
Then I confirm with: cat /mnt/state/root-overlay/etc/NetworkManager/system-connections/client_connection
All this was only possible because I had the client put up a new network with the creds the devices shipped with. I put two profiles, one for use and one I could have an installer set up in a pinch without sharing client secrets.
I am worried that an OS update will wipe these new profiles and was wondering if there was a more permanent way to put things in place. I know there is a DBUS API, and if I have to explore that route I will but I don’t understand how that is more permanent unless that depends on my container updating the connections every time which is not a good solution for me.
If I have to do this in the future I would rather have a script do this thru the balena api interface.
How badly did I hurt my future self?
Will OS updates roll out automatically?