diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-29 15:06:05 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-29 15:12:04 +0200 |
commit | af87333fe4164c9d37f8d21d50dd4e164378c709 (patch) | |
tree | 19e2c173256a5be2ac1285ed29cbbd4d5c7fe0e0 /python/vyos/ifconfig/dhcp.py | |
parent | 1d909e0c5358a0d733baffe6cd533d21927ed147 (diff) | |
download | vyos-1x-af87333fe4164c9d37f8d21d50dd4e164378c709.tar.gz vyos-1x-af87333fe4164c9d37f8d21d50dd4e164378c709.zip |
dhclient: T2393: switch to old configuration path to keep existing op-mode tolls intact
Diffstat (limited to 'python/vyos/ifconfig/dhcp.py')
-rw-r--r-- | python/vyos/ifconfig/dhcp.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/python/vyos/ifconfig/dhcp.py b/python/vyos/ifconfig/dhcp.py index d3e75c292..bf6566c07 100644 --- a/python/vyos/ifconfig/dhcp.py +++ b/python/vyos/ifconfig/dhcp.py @@ -19,20 +19,20 @@ from vyos.dicts import FixedDict from vyos.ifconfig.control import Control from vyos.template import render +config_base = r'/var/lib/dhcp/dhclient_' class _DHCPv4 (Control): def __init__(self, ifname): super().__init__() - config_base = r'/run/dhclient' self.options = FixedDict(**{ 'ifname': ifname, 'hostname': '', 'client_id': '', 'vendor_class_id': '', - 'conf_file': config_base + f'/{ifname}.conf', - 'options_file': config_base + f'/{ifname}.options', - 'pid_file': config_base + f'/{ifname}.pid', - 'lease_file': config_base + f'/{ifname}.leases', + 'conf_file': config_base + f'{ifname}.conf', + 'options_file': config_base + f'{ifname}.options', + 'pid_file': config_base + f'{ifname}.pid', + 'lease_file': config_base + f'{ifname}.leases', }) # replace dhcpv4/v6 with systemd.networkd? @@ -83,13 +83,12 @@ class _DHCPv4 (Control): class _DHCPv6 (Control): def __init__(self, ifname): super().__init__() - config_base = r'/run/dhclient6' self.options = FixedDict(**{ 'ifname': ifname, - 'conf_file': config_base + f'/{ifname}.conf', - 'options_file': config_base + f'/{ifname}.options', - 'pid_file': config_base + f'/{ifname}.pid', - 'lease_file': config_base + f'/{ifname}.leases', + 'conf_file': config_base + f'v6_{ifname}.conf', + 'options_file': config_base + f'v6_{ifname}.options', + 'pid_file': config_base + f'v6_{ifname}.pid', + 'lease_file': config_base + f'v6_{ifname}.leases', 'dhcpv6_prm_only': False, 'dhcpv6_temporary': False, }) |