diff options
Diffstat (limited to 'src/live/ogOperations.py')
-rw-r--r-- | src/live/ogOperations.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 74e4c09..83242d2 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -648,6 +648,16 @@ class OgLiveOperations: if not fstype: raise OgError(f'No filesystem detected in {padev}. Aborting image creation') + ro_mountpoint = padev.replace('dev', 'mnt') + if not mount_mkdir(padev, ro_mountpoint, readonly=True): + raise OgError(f'Cannot mount {ro_mountpoint} as readonly') + + try: + if is_hibernation_enabled(ro_mountpoint): + raise OgError(f'Target system in {padev} has hibernation enabled') + finally: + umount(ro_mountpoint) + if change_access(user=self._smb_user, pwd=self._smb_pass) == -1: raise OgError('remount of /opt/opengnsys/images has failed') |