Add autoconnect / onboot support to Debian networking

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-09-18 19:00:09 -06:00
parent e21c266ded
commit f88f3507ba
2 changed files with 12 additions and 10 deletions

View File

@@ -1,19 +1,21 @@
{{- $host := .BuildHost }}
{{- $time := .BuildTime }}
{{- $source := .BuildSource }}
{{range $devname, $netdev := .NetDevs -}}
{{range $devname, $netdev := .ThisNode.NetDevs -}}
{{- $filename := print $devname }}
{{- file $filename }}
# This file is autogenerated by warewulf
# Host: {{ $host }}
# Time: {{ $time }}
# Source: {{ $source }}
auto {{$netdev.Device}}
allow-hotplug {{$netdev.Device}}
iface {{$netdev.Device}} inet static
address {{$netdev.Ipaddr}}
netmask {{$netdev.Netmask}}
gateway {{$netdev.Gateway}}
mtu {{$netdev.MTU}}
up ifmetric {{$netdev.Device}} 30
{{ if $netdev.OnBoot.GetB -}}
auto {{$netdev.Device.Get}}
{{ end -}}
allow-hotplug {{$netdev.Device.Get}}
iface {{$netdev.Device.Get}} inet static
address {{$netdev.Ipaddr.Get}}
netmask {{$netdev.Netmask.Get}}
gateway {{$netdev.Gateway.Get}}
mtu {{$netdev.MTU.Get}}
up ifmetric {{$netdev.Device.Get}} 30
{{- end}}