From d109e99dbed453f2eb535e381ef807289f1040ac Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 9 May 2024 11:44:43 +0200 Subject: utils: rename cache_probe() to get_cache_dev_path() This method reports the /dev path to cache partition, rename it. Add explicit check if blkid is successful. And add logging to report that device path to cache is not found. --- src/utils/cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils/cache.py') diff --git a/src/utils/cache.py b/src/utils/cache.py index afdc75a..b60b5be 100644 --- a/src/utils/cache.py +++ b/src/utils/cache.py @@ -11,7 +11,7 @@ import os from src.utils.fs import mount_mkdir, umount from src.utils.net import getifaddr -from src.utils.probe import cache_probe +from src.utils.probe import get_cache_dev_path OGIMG='/opt/opengnsys/images/' OGCACHE_MOUNTPOINT='/opt/opengnsys/cache' @@ -23,7 +23,7 @@ def mount_cache(): Returns the mountpoint or an empty string. """ - cache_dev = cache_probe() + cache_dev = get_cache_dev_path() if cache_dev: # cache_target = cache_dev.replace('dev', 'mnt') -- cgit v1.2.3-18-g5258