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?
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?