2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-11-29 02:56:24 +00:00

network-manager: fix ifupdown-ng not available, netplan use mac as dhcp identifier

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
Adphi 2022-08-12 17:55:15 +02:00
parent 15e3135bb3
commit e38f27eedf
Signed by: adphi
GPG Key ID: F2159213400E50AB
3 changed files with 4 additions and 2 deletions

Binary file not shown.

View File

@ -27,13 +27,14 @@ network:\n\
ethernets:\n\
eth0:\n\
dhcp4: true\n\
dhcp-identifier: mac\n\
nameservers:\n\
addresses:\n\
- 8.8.8.8\n\
- 8.8.4.4\n\
' > /etc/netplan/00-netcfg.yaml
{{ else if eq .NetworkManager "ifupdown"}}
RUN apt install -y ifupdown2
RUN if [ -z "$(apt-cache madison ifupdown2 2> /dev/nul)" ]; then apt install -y ifupdown; else apt install -y ifupdown2; fi
RUN mkdir -p /etc/network && printf '\
auto eth0\n\
allow-hotplug eth0\n\

View File

@ -26,13 +26,14 @@ network:\n\
ethernets:\n\
eth0:\n\
dhcp4: true\n\
dhcp-identifier: mac\n\
nameservers:\n\
addresses:\n\
- 8.8.8.8\n\
- 8.8.4.4\n\
' > /etc/netplan/00-netcfg.yaml
{{ else if eq .NetworkManager "ifupdown"}}
RUN apt install -y ifupdown-ng
RUN if [ -z "$(apt-cache madison ifupdown-ng 2> /dev/nul)" ]; then apt install -y ifupdown; else apt install -y ifupdown-ng; fi
RUN mkdir -p /etc/network && printf '\
auto eth0\n\
allow-hotplug eth0\n\