bundles/systemd-networkd: rework routes

This commit is contained in:
Franzi 2021-04-01 16:25:24 +02:00
parent b52a196c73
commit d787f8b0a3
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 8 additions and 7 deletions

View file

@ -16,10 +16,12 @@ Name=${interface}
Address=${ip}/${prefix}
% endfor
% for route in config.get('routes', {}):
% for route, rconfig in sorted(config.get('routes', {}).items()):
[Route]
% if 'via' in rconfig:
Gateway=${route['via']}
Destination=${route['to']}
% endif
Destination=${route}
GatewayOnlink=yes
% endfor