diff options
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-x | src/conf_mode/accel_pppoe.py | 6 | ||||
-rwxr-xr-x | src/conf_mode/host_name.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/conf_mode/accel_pppoe.py b/src/conf_mode/accel_pppoe.py index 9c879502a..6aec9be98 100755 --- a/src/conf_mode/accel_pppoe.py +++ b/src/conf_mode/accel_pppoe.py @@ -44,6 +44,9 @@ pppoe_config = ''' [modules] log_syslog pppoe +{% if authentication['mode'] == 'radius' %} +radius +{% endif %} ippool {% if client_ipv6_pool %} ipv6pool @@ -63,9 +66,6 @@ net-snmp {% if limits %} connlimit {% endif %} -{% if authentication['mode'] == 'radius' %} -radius -{% endif %} [core] thread-count={{thread_cnt}} diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index bb1ec9597..47cf232e9 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -66,7 +66,7 @@ def get_config(): hosts['nameserver'] = conf.return_values("system name-server") if conf.exists("system disable-dhcp-nameservers"): - hosts['no_dhcp_ns'] = conf.exists('system disable-dhcp-nameservers') + hosts['no_dhcp_ns'] = True # system static-host-mapping hosts['static_host_mapping'] = [] @@ -135,6 +135,10 @@ def apply(config): try: client = vyos.hostsd_client.Client() + # Check if disable-dhcp-nameservers is configured, and if yes - delete DNS servers added by DHCP + if config['no_dhcp_ns']: + client.delete_name_servers('dhcp-.+') + client.set_host_name(config['hostname'], config['domain_name'], config['domain_search']) client.delete_name_servers(tag) |