summaryrefslogtreecommitdiffstats
path: root/src/utils/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/cache.py')
-rw-r--r--src/utils/cache.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/cache.py b/src/utils/cache.py
index 374f8e0..6358c6a 100644
--- a/src/utils/cache.py
+++ b/src/utils/cache.py
@@ -10,7 +10,7 @@ import logging
import os
from src.utils.fs import mount_mkdir, umount
-from src.utils.net import getifaddr
+from src.utils.net import *
from src.utils.probe import get_cache_dev_path
OG_IMAGE_PATH = '/opt/opengnsys/images/'
@@ -45,7 +45,7 @@ def write_cache_txt(content):
"""
Dumps content to /opt/opengnsys/log/{ip}.cache.txt
"""
- client_ip = getifaddr(os.getenv('DEVICE'))
+ client_ip = getifaddr(get_ethernet_interface())
with open(OGCLIENT_LOG_CACHE.format(ip=client_ip), 'w') as f:
logging.debug('Writing cache contents to %s.cache.txt', client_ip)
f.write(content)