mirror of
https://github.com/linka-cloud/d2vm.git
synced 2024-11-22 07:46:25 +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:
parent
77690dbb57
commit
d0b775ab21
Binary file not shown.
@ -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\
|
||||
|
@ -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\
|
||||
|
Loading…
Reference in New Issue
Block a user