diff options
author | Christian Breunig <christian@breunig.cc> | 2023-08-04 20:12:23 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-08-04 20:12:23 +0200 |
commit | 292b064d743522d11179bd3cd91a08731380f3a9 (patch) | |
tree | 37928a579f4624a447ad46277e43e966f03881ae /src/op_mode/dhcp.py | |
parent | 3aac2941efc473c5d52cf9271d778bd51a72dfc7 (diff) | |
download | vyos-1x-292b064d743522d11179bd3cd91a08731380f3a9.tar.gz vyos-1x-292b064d743522d11179bd3cd91a08731380f3a9.zip |
dhcp: T5428: provide common direcotry path via vyos.defaults.directories
Multiple scripts use the same hardcoded path for DHCP client leases in
different direcotries - this can't be worse.
Diffstat (limited to 'src/op_mode/dhcp.py')
-rwxr-xr-x | src/op_mode/dhcp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/dhcp.py b/src/op_mode/dhcp.py index 20ef698bd..544156e1c 100755 --- a/src/op_mode/dhcp.py +++ b/src/op_mode/dhcp.py @@ -295,8 +295,9 @@ def show_server_leases(raw: bool, family: ArgFamily, pool: typing.Optional[str], def _get_raw_client_leases(family='inet', interface=None): from time import mktime from datetime import datetime + from vyos.defaults import directories - lease_dir = '/var/lib/dhcp' + lease_dir = directories['isc_dhclient_dir'] lease_files = [] lease_data = [] |