Skip to content

Commit

Permalink
network-manager: fix ifupdown-ng not available, netplan use mac as dh…
Browse files Browse the repository at this point in the history
…cp identifier

Signed-off-by: Adphi <[email protected]>
  • Loading branch information
Adphi committed Sep 10, 2022
1 parent 77690db commit d0b775a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Binary file modified cmd/d2vm/run/sparsecat-linux-amd64
Binary file not shown.
3 changes: 2 additions & 1 deletion templates/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down
3 changes: 2 additions & 1 deletion templates/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down

0 comments on commit d0b775a

Please sign in to comment.