When I first split the debian interfaces support from wwinit, I was unable to figure out what it was called. I used the inelegant name "debian.interfaces" to identify it; but I have since learned that it is called "ifupdown." I have since learned that there is even a variant implementation, ifupdown-ng, that is used by Alpine Linux. This PR renames the overlay to ifupdown, but retains a copy of it at debian.interfaces for backwards compatibility. Signed-off-by: Jonathon Anderson <janderson@ciq.com>
19 lines
678 B
Plaintext
19 lines
678 B
Plaintext
{{- range $devname, $netdev := .ThisNode.NetDevs }}
|
|
{{ file $devname }}
|
|
# This file is autogenerated by warewulf
|
|
{{- if $netdev.OnBoot.BoolDefaultTrue }}
|
|
auto {{ $netdev.Device }}
|
|
{{- end }}
|
|
allow-hotplug {{ $netdev.Device }}
|
|
iface {{ $netdev.Device }} inet static
|
|
address {{ $netdev.Ipaddr }}
|
|
netmask {{ $netdev.Netmask }}
|
|
{{ if $netdev.Gateway }}gateway {{ $netdev.Gateway }}{{ end }}
|
|
{{ if $netdev.MTU }}mtu {{ $netdev.MTU }}{{ end }}
|
|
{{- range $tk, $tv := $netdev.Tags }}
|
|
{{- if eq (substr 0 5 $tk) "route" }}
|
|
up ip route add {{ index (splitList "," $tv) 0 }} via {{ index (splitList "," $tv) 1 }} dev {{ $netdev.Device }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{ end -}}
|