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

34 lines
520 B
SYSTEMD
Raw Normal View History

2020-06-06 08:18:25 +00:00
[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