summaryrefslogtreecommitdiffstats
path: root/src/live
diff options
context:
space:
mode:
Diffstat (limited to 'src/live')
-rw-r--r--src/live/ogOperations.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index e8a3b40..485b4d7 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -39,7 +39,6 @@ from src.log import OgError
OG_SHELL = '/bin/bash'
-OG_CACHE_PATH = '/opt/opengnsys/cache/opt/opengnsys/images'
class OgLiveOperations:
def __init__(self, config):
@@ -181,7 +180,7 @@ class OgLiveOperations:
Implies a unicast transfer. Does not use tiptorrent.
"""
src = f'/opt/opengnsys/images/{image_name}.img'
- dst = f'/opt/opengnsys/cache/opt/opengnsys/images/{image_name}.img'
+ dst = f'{OG_CACHE_IMAGE_PATH}{image_name}.img'
try:
r = shutil.copy(src, dst)
tip_write_csum(image_name)
@@ -194,7 +193,7 @@ class OgLiveOperations:
raise OgError(f'Cannot change repository to {repo}')
if cache:
- image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img'
+ image_path = f'{OG_CACHE_IMAGE_PATH}{name}.img'
if (not os.path.exists(image_path) or
not tip_check_csum(repo, name)):
self._copy_image_to_cache(name)
@@ -203,10 +202,10 @@ class OgLiveOperations:
self._restore_image(image_path, devpath)
def _restore_image_tiptorrent(self, repo, name, devpath):
- if not os.path.exists(OG_CACHE_PATH):
+ if not os.path.exists(OG_CACHE_IMAGE_PATH):
raise OgError('No cache partition is mounted')
- image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img'
+ image_path = f'{OG_CACHE_IMAGE_PATH}{name}.img'
try:
if (not os.path.exists(image_path) or not tip_check_csum(repo, name)):
tip_client_get(repo, name)