mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
sys_patch.py: Fix path string comparison
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
app_path="/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher"
|
app_path="/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher"
|
||||||
args="--patch_sys_vol"
|
args="--patch_sys_vol"
|
||||||
"$app_path" "$args" > "/Users/Shared/.OCLP-AutoPatcher-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
"$app_path" "$args" &> "/Users/Shared/.OCLP-AutoPatcher-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
log show --last boot > "/Users/Shared/.System-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
log show --last boot > "/Users/Shared/.OCLP-System-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
dmesg > "/Users/Shared/.Kernel-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
dmesg > "/Users/Shared/.OCLP-Kernel-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
ps aux > "/Users/Shared/.Process-List-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
ps aux > "/Users/Shared/.OCLP-Process-List-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
ls -l "/System/Volumes/Update/mnt1/System/Library/KernelCollections" > "/Users/Shared/.Kernel-Collections-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
ls -l "/System/Volumes/Update/mnt1/System/Library/KernelCollections" > "/Users/Shared/.OCLP-Kernel-Collections-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
kmutil showloaded > "/Users/Shared/.Loaded-Kexts-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
kmutil showloaded > "/Users/Shared/.OCLP-Loaded-Kexts-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
kmutil inspect -B "/System/Volumes/Update/mnt1/System/Library/KernelCollections/BootKernelExtensions.kc" > "/Users/Shared/.BootKernelExtensions-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
kmutil inspect -B "/System/Volumes/Update/mnt1/System/Library/KernelCollections/BootKernelExtensions.kc" > "/Users/Shared/.OCLP-BootKernelExtensions-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
kmutil inspect -S "/System/Volumes/Update/mnt1/System/Library/KernelCollections/SystemKernelExtensions.kc" > "/Users/Shared/.SystemKernelExtensions-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
kmutil inspect -S "/System/Volumes/Update/mnt1/System/Library/KernelCollections/SystemKernelExtensions.kc" > "/Users/Shared/.OCLP-SystemKernelExtensions-$(date +"%Y_%m_%d_%I_%M_%p").txt"
|
||||||
reboot
|
reboot
|
||||||
@@ -284,7 +284,7 @@ class PatchSysVolume:
|
|||||||
def unmount_drive(self):
|
def unmount_drive(self):
|
||||||
# When we detect we're chainloaded in the Installer, skip unmounting
|
# When we detect we're chainloaded in the Installer, skip unmounting
|
||||||
# We have logging in place to pull additional info after we're done
|
# We have logging in place to pull additional info after we're done
|
||||||
if not "Library/InstallerSandboxes/" in self.constants.payload_path:
|
if not "Library/InstallerSandboxes/" in str(self.constants.payload_path):
|
||||||
print("- Unmounting Root Volume (Don't worry if this fails)")
|
print("- Unmounting Root Volume (Don't worry if this fails)")
|
||||||
utilities.elevated(["diskutil", "unmount", self.root_mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
utilities.elevated(["diskutil", "unmount", self.root_mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
else:
|
else:
|
||||||
@@ -719,7 +719,7 @@ class PatchSysVolume:
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
def download_files(self):
|
def download_files(self):
|
||||||
if self.constants.gui_mode is False or (self.constants.wxpython_variant is True and "Library/InstallerSandboxes/" in self.constants.payload_path):
|
if self.constants.gui_mode is False or (self.constants.wxpython_variant is True and "Library/InstallerSandboxes/" in str(self.constants.payload_path)):
|
||||||
download_result, os_ver, link = sys_patch_download.grab_patcher_support_pkg(self.constants).download_files()
|
download_result, os_ver, link = sys_patch_download.grab_patcher_support_pkg(self.constants).download_files()
|
||||||
else:
|
else:
|
||||||
download_result = True
|
download_result = True
|
||||||
|
|||||||
Reference in New Issue
Block a user