assign _eth0_ to default network interface
This commit is contained in:
10
overlays/system/debian/etc/network/interfaces.d/eth0.ww
Executable file
10
overlays/system/debian/etc/network/interfaces.d/eth0.ww
Executable file
@@ -0,0 +1,10 @@
|
||||
auto eth0
|
||||
allow-hotplug eth0
|
||||
iface eth0 inet static
|
||||
address {{.NetDevs.eth0.Ipaddr}}
|
||||
netmask {{.NetDevs.eth0.Netmask}}
|
||||
gateway {{.NetDevs.eth0.Gateway}}
|
||||
up ifmetric eth0 30
|
||||
|
||||
|
||||
|
||||
11
overlays/system/debian/systemd/network/10-persistent-net.link.ww
Executable file
11
overlays/system/debian/systemd/network/10-persistent-net.link.ww
Executable file
@@ -0,0 +1,11 @@
|
||||
# /etc/systemd/network/10-persistent-net.link
|
||||
|
||||
{{range $devname, $netdev := .NetDevs}}
|
||||
{{- if $netdev.Default}}
|
||||
[Match]
|
||||
MACAddress={{$netdev.Hwaddr}}
|
||||
[Link]
|
||||
Name={{$devname}}
|
||||
{{- end}}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user