Where is the interfaces file in CoreELEC?

I want to communicate docker container with host by macvlan in CoreElEC.So I programed some commands as below:

ip link set eth0 promisc on
ip link add hMACvLAN address 2A:C1:E6:39:5C:0F link eth0 type macvlan mode bridge
ip link set hMACvLAN up
connmanctl disconnect ethernet_00acc0ffffff_cable
connmanctl config ethernet_2ac1e6395c0f_cable --ipv4 manual 192.168.0.253 255.255.255.0 192.168.0.2 --nameservers 192.168.0.2

And I want to write them into the interfaces file instead of typing them each time when i boot up CoreELEC.But I don’t find the interfaces file in CoreELEC in terminal.What can i do next?

One option is to save commands to shell file and run it from docker systemd file and ExecPre.

To avoid typing the script /storage/.config/autostart.sh is run on startup if found and executable.

It can’t be found the autostart.sh in the directory.I created a autostart.sh and put the script to it.
But when I run it,docker threw an error(exitcode 255:cannot assign requested address).About this error,i think the docker service had booted up before the ip address which i had set(a static ip 192.168.0.253)to hMACvLAN interface was assigned.So i put another command “systemctl restart docker.service” to the shell file.

Howerver,when i run several containers,it threw the same error aigain.I had tried to put the script into /storage/.kodi/addons/service.system.docker/system.d/service.system.docker.service which doesn’t work either.What should I do?

Where is the docker systemd file?And How to execpre?

Then just create another systemd service and add a condition to run your scripts after docker service started.

/storage/.kodi/addons/service.system.docker/system.d/service.system.docker.service


ExecStartPre=/bin/sh -c '/storage/some_your_script.sh'
ExecStart=....

This is also an option - probably even better one. But it must run before not after.