utils: make init_cache() use the cache mountpoint

Make init_cache() use the actual cache mountpoint returned by the
function mount_cache() for the creation of the cache directories
instead of a hardcoded path.
master
Alejandro Sirgo Rica 2024-03-26 10:56:38 +01:00
parent 3aa76e4039
commit c3ce5342c9
1 changed files with 1 additions and 1 deletions

View File

@ -79,4 +79,4 @@ def init_cache():
mountpoint = mount_cache() mountpoint = mount_cache()
if mountpoint: if mountpoint:
logging.info(f'Creating cache directory at {mountpoint}') logging.info(f'Creating cache directory at {mountpoint}')
os.makedirs('/opt/opengnsys/cache/opt/opengnsys/images') os.makedirs(f'{mountpoint}/opt/opengnsys/images')