summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/live/ogOperations.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index 6e528f8..3eee06a 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -160,14 +160,15 @@ class OgLiveOperations:
def _write_md5_file(self, path):
if not os.path.exists(path):
- raise OgError(f'Invalid image path {path} when computing md5 checksum')
+ raise OgError(f'Failed to calculate checksum, image file {path} does not exist')
+
filename = path + ".full.sum"
dig = self._compute_md5(path)
try:
with open(filename, 'w') as f:
f.write(dig)
except:
- logging.error(f'cannot write {filename}')
+ logging.error(f'Cannot write checksum {filename}')
return -1
return 0
@@ -470,12 +471,12 @@ class OgLiveOperations:
self._ogbrowser_clear_logs()
self._restartBrowser(self._url_log)
+ logging.info(f'Request to create image {name}.img at repository {repo}')
+
if ogChangeRepo(repo, smb_user=self._smb_user, smb_pass=self._smb_pass) != 0:
self._restartBrowser(self._url)
raise OgError(f'Cannot change image repository to {repo}')
- logging.info(f'Request to create image {name}.img at repository {repo}')
-
if ogRest.terminated:
return
@@ -560,6 +561,9 @@ class OgLiveOperations:
else:
raise
+ logging.info(f'Writing checksum file {name}.img.full.sum...')
+ logging.info('*DO NOT REBOOT OR POWEROFF* the client during this time')
+
if self._write_md5_file(f'/opt/opengnsys/images/{name}.img') == -1:
raise OgError(f'Cannot write {name}.full.sum file')