Set Environment Variable on Boot

Hi,

I’m pretty new to this so bare with me.

I would like a simple script to be executed on boot which gets the MAC address of the primary network interface and sets it to an environment variable on the host OS so I can then safely pass that variable to containers.

Usually I would just use crontab with @reboot on the host OS but I am not sure how to achieve this with balenaOS in such a way I can set this up as functionality that is automatic when I flash new devices.

Cheers
Chris

Semi related, how could I add a package to host balenaOS base image?