{{- $host := .BuildHost }}
{{- $time := .BuildTime }}
{{- $source := .BuildSource }}
{{range $devname, $netdev := .NetDevs -}}
{{- $filename := print "ifcfg-" $devname ".conf" }}
{{- file $filename }}
# This file is autogenerated by warewulf
# Host:   {{ $host }}
# Time:   {{ $time }}
# Source: {{ $source }}
DEVICE={{ $netdev.Device }}
NAME=default
BOOTPROTO=static
DEVTIMEOUT=10
IPADDR={{ $netdev.Ipaddr }}
NETMASK={{ $netdev.Netmask }}
{{ if $netdev.Gateway -}}
GATEWAY={{ $netdev.Gateway }}
{{ end -}}
{{ if $netdev.Hwaddr -}}
HWADDR={{ $netdev.Hwaddr }}
{{ end -}}
ONBOOT=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
{{ if $netdev.Ipaddr6 -}}
IPV6ADDR="{{ $netdev.Ipaddr6 }}" 
{{ end -}}
{{ end -}}
