Skip to content

Commit 768c00f

Browse files
committed
fix unmount volume
1 parent aa62c73 commit 768c00f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

oclp_r/sys_patch/mount/mount.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,14 @@ def _mount_root_volume(self) -> str:
7070

7171
result_unmount = subprocess_wrapper.run_as_root(["/usr/sbin/diskutil", "unmount", f"/dev/{self.root_volume_identifier}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
7272
if result_unmount.returncode != 0:
73-
logging.info("Maybe disk has already been unmounted.")
74-
subprocess_wrapper.log(result_unmount)
73+
logging.info(f"{self.root_volume_identifier} has already been unmounted.")
7574

7675
result = subprocess_wrapper.run_as_root(["/sbin/mount", "-o", "nobrowse", "-t", "apfs", f"/dev/{self.root_volume_identifier}", "/System/Volumes/Update/mnt1"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
7776
if result.returncode != 0:
7877
logging.error("Failed to mount root volume")
7978
subprocess_wrapper.log(result)
8079
return None
8180
return "/System/Volumes/Update/mnt1"
82-
8381
return None
8482

8583

0 commit comments

Comments
 (0)