Remove backups on pre-snapshot based OSes

This commit is contained in:
Mykola Grymalyuk
2021-11-14 12:29:31 -07:00
parent 1799691348
commit 606dc03b2b
2 changed files with 11 additions and 5 deletions

View File

@@ -69,7 +69,9 @@ class PatchSysVolume:
if Path(self.mount_extensions).exists():
print("- Root Volume is already mounted")
if patch is True:
if self.constants.detected_os < os_data.os_data.big_sur or (self.constants.detected_os == os_data.os_data.big_sur and utilities.check_seal() is True):
# Root Volume unpatching is unreliable due to being a live volume
# Only worth while on Big Sur as '--last-sealed-snapshot' is hit or miss
if self.constants.detected_os == os_data.os_data.big_sur and utilities.check_seal() is True:
self.backup_volume()
self.patch_root_vol()
return True
@@ -83,7 +85,9 @@ class PatchSysVolume:
if Path(self.mount_extensions).exists():
print("- Successfully mounted the Root Volume")
if patch is True:
if self.constants.detected_os < os_data.os_data.big_sur or (self.constants.detected_os == os_data.os_data.big_sur and utilities.check_seal() is True):
# Root Volume unpatching is unreliable due to being a live volume
# Only worth while on Big Sur as '--last-sealed-snapshot' is hit or miss
if self.constants.detected_os == os_data.os_data.big_sur and utilities.check_seal() is True:
self.backup_volume()
self.patch_root_vol()
return True