Use Device for Link, fallback to name
If for the provison network an arbitary name, like overlay is used not default, the Name for the network device was the network name and not the physical device.
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
# /etc/systemd/network/10-persistent-net.link
|
||||
# This file is autogenerated by warewulf
|
||||
# Host: {{.BuildHost}}
|
||||
# Time: {{.BuildTime}}
|
||||
# Source: {{.BuildSource}}
|
||||
{{range $devname, $netdev := .NetDevs}}
|
||||
{{- if $netdev.Primary}}
|
||||
[Match]
|
||||
MACAddress={{$netdev.Hwaddr}}
|
||||
[Link]
|
||||
Name={{$devname}}
|
||||
{{- end}}
|
||||
{{ if $netdev.Device -}}
|
||||
Name={{ $netdev.Device }}
|
||||
{{ else -}}
|
||||
Name={{ $devname }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user