Use state-based routing instead of sentinel strings, so whitespace-trimming
syntax (e.g. `{{- file "name" -}}`) correctly creates all named files and
symlinks.
Fixes: #2118
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
Co-authored-by: Christian Goll <cgoll@suse.com>
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
11 lines
277 B
Plaintext
11 lines
277 B
Plaintext
{{ range $devname, $netdev := .NetDevs -}}
|
|
{{- file (print "10-ww4-netname-" $devname ".link") -}}
|
|
# This file is autogenerated by warewulf
|
|
{{- if and $netdev.Hwaddr $netdev.Device }}
|
|
[Match]
|
|
MACAddress={{$netdev.Hwaddr}}
|
|
[Link]
|
|
Name={{ $netdev.Device }}
|
|
{{ end -}}
|
|
{{ end -}}
|