summaryrefslogtreecommitdiff
path: root/python/vyos/template.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 /python/vyos/template.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 'python/vyos/template.py')
-rw-r--r--python/vyos/template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index 7d1c3970f..6469623fd 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -420,7 +420,7 @@ def get_dhcp_router(interface):
Returns False of no router is found, returns the IP address as string if
a router is found.
"""
- lease_file = f'/var/lib/dhcp/dhclient_{interface}.leases'
+ lease_file = directories['isc_dhclient_dir'] + f'/dhclient_{interface}.leases'
if not os.path.exists(lease_file):
return None