bundlewrap/bundles/systemd-networkd/files/template.network

33 lines
520 B
SYSTEMD

[Match]
Name=${interface}
[Network]
% if config.get('dhcp', False):
DHCP=yes
IPv6AcceptRA=yes
UseHostname=no
% else:
DHCP=no
IPv6AcceptRA=no
% endif
% for addr in sorted(config.get('ip_addresses', set())):
Address=${addr}
% endfor
% if config.get('ip4_masquerade_outgoing', False):
IPMasquerade=yes
IPForward=ipv4
%endif
% if 'ip6_gateway' in config:
[Route]
Gateway=${config['ip6_gateway']}
GatewayOnLink=yes
% endif
% if 'ip4_gateway' in config:
[Route]
Gateway=${config['ip4_gateway']}
GatewayOnLink=yes
% endif