bundlewrap/bundles/systemd-networkd/files/template-iface-dhcp.network
Franziska Kunsmann 8536e87475
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/systemd-networkd: some more dhcp settings
2021-04-18 11:05:42 +02:00

27 lines
512 B
SYSTEMD

<%
from ipaddress import ip_network
%>\
[Match]
Name=${interface}
[Network]
DHCP=yes
IPv6AcceptRA=yes
[DHCPv4]
UseDomains=${str(config.get('use_dhcp_domains', False)).lower()}
UseHostname=no
UseMTU=${str(config.get('use_dhcp_mtu', True)).lower()}
UseNTP=${str(config.get('use_dhcp_ntp', False)).lower()}
UseTimezone=no
% if config.get('send_hostname', True):
SendHostname=yes
Hostname=${node.name.split('.')[-1]}
% else:
SendHostname=no
% endif
% if config.get('forwarding', False):
IPForward=yes
%endif