summaryrefslogtreecommitdiff
path: root/src/op_mode/dhcp.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-08-04 20:12:23 +0200
committerChristian Breunig <christian@breunig.cc>2023-08-04 20:12:23 +0200
commit292b064d743522d11179bd3cd91a08731380f3a9 (patch)
tree37928a579f4624a447ad46277e43e966f03881ae /src/op_mode/dhcp.py
parent3aac2941efc473c5d52cf9271d778bd51a72dfc7 (diff)
downloadvyos-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-xsrc/op_mode/dhcp.py3
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 = []