Merge pull request #1017 from brianphan/fix-10-persistent-net-link
Update 10-persistent-net.link.ww
This commit is contained in:
@@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fixed bug where tags from profiles weren't rendered #967
|
||||
- Fixed a bug when using `wwctl container import --force` to replace an existing container
|
||||
will generate an error #474
|
||||
- Create `/etc/systemd/network/10-persistent-net-<netdev>.link` file per network device
|
||||
|
||||
### Changed
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ defaultnode:
|
||||
- default
|
||||
network devices:
|
||||
dummy:
|
||||
device: eth0
|
||||
type: ethernet
|
||||
netmask: 255.255.255.0
|
||||
.EE
|
||||
|
||||
@@ -35,7 +35,6 @@ defaultnode:
|
||||
- default
|
||||
network devices:
|
||||
dummy:
|
||||
device: eth0
|
||||
type: ethernet
|
||||
netmask: 255.255.255.0
|
||||
onboot: true`
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
{{ range $devname, $netdev := .NetDevs -}}
|
||||
{{- $filename := print "10-persistent-net-" $devname ".link" }}
|
||||
{{- file $filename }}
|
||||
# This file is autogenerated by warewulf
|
||||
# Host: {{.BuildHost}}
|
||||
# Time: {{.BuildTime}}
|
||||
# Source: {{.BuildSource}}
|
||||
{{range $devname, $netdev := .NetDevs}}
|
||||
{{- if $netdev.Hwaddr }}
|
||||
# Host: {{$.BuildHost}}
|
||||
# Time: {{$.BuildTime}}
|
||||
# Source: {{$.BuildSource}}
|
||||
{{- if and $netdev.Hwaddr $netdev.Device }}
|
||||
[Match]
|
||||
MACAddress={{$netdev.Hwaddr}}
|
||||
[Link]
|
||||
{{ if $netdev.Device -}}
|
||||
Name={{ $netdev.Device }}
|
||||
{{ else -}}
|
||||
Name={{ $devname }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user