diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-03-08 20:23:01 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-03-08 20:23:29 +0100 |
commit | 993c2975141a255ca7dece41bbaf4271ae264515 (patch) | |
tree | 322bc2e0600119853ab7147e8003aca41e8bb8e2 /src/conf_mode | |
parent | ed620ef7e8ba741e165698c558b110a31cc35dfd (diff) | |
download | vyos-1x-993c2975141a255ca7dece41bbaf4271ae264515.tar.gz vyos-1x-993c2975141a255ca7dece41bbaf4271ae264515.zip |
T103: [dhcp-server] beautify generated configuration file
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/dhcp_server.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conf_mode/dhcp_server.py b/src/conf_mode/dhcp_server.py index 22ada72a8..12d138218 100755 --- a/src/conf_mode/dhcp_server.py +++ b/src/conf_mode/dhcp_server.py @@ -104,7 +104,9 @@ failover peer "{{ subnet.failover_name }}" { {% for network in shared_network %} {%- if not network.disabled -%} shared-network {{ network.name }} { - {{ "authoritative;" if network.authoritative }} + {%- if network.authoritative %} + authoritative; + {%- endif %} {%- if network.network_parameters %} # The following {{ network.network_parameters | length }} line(s) were added as shared-network-parameters in the CLI and have not been validated {%- for param in network.network_parameters %} @@ -216,7 +218,7 @@ shared-network {{ network.name }} { set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)); set ClientDomain = pick-first-value(config-option domain-name, "..YYZ!"); execute("/usr/libexec/vyos/system/on-dhcp-event.sh", "commit", ClientName, ClientIp, ClientMac, ClientDomain); - {% endif -%} + {%- endif %} } } {%- endif %} |