From: srs5694 Date: Sat, 7 Nov 2015 20:03:55 +0000 (-0500) Subject: Improvements to refind-install: Improved SIP detection & fixed OS X X-Git-Url: https://code.delx.au/refind/commitdiff_plain/69ed07437a519caffe15692f527f47cc2297f0b5 Improvements to refind-install: Improved SIP detection & fixed OS X "umount" problems. --- diff --git a/refind-install b/refind-install index c851952..6297dc8 100755 --- a/refind-install +++ b/refind-install @@ -698,7 +698,8 @@ ENDOFHERE CheckForSIP() { if [[ -x "/usr/bin/csrutil" ]] ; then - local OKToInstall=`/usr/bin/csrutil status | grep "Protection status: enabled (Custom Configuration\|Apple Internal)"` + local OKToInstall=`/usr/bin/csrutil status | \ + grep "Protection status: disabled\|enabled (Apple Internal)\|NVRAM Protections: disabled"` if [[ -z "$OKToInstall" ]] ; then echo echo "**** ALERT: SIP ENABLED! ****" @@ -761,7 +762,7 @@ InstallOnOSX() { CheckForSIP Platform=`ioreg -l -p IODeviceTree | grep firmware-abi | cut -d "\"" -f 4` CopyRefindFiles - cp "$ThisDir/mountesp" /usr/local/bin + cp "$ThisDir/mountesp" /usr/local/bin &> /dev/null if [[ $InstallToEspOnMac == "1" ]] ; then bless --mount "$InstallDir" --setBoot --file "$InstallDir/$TargetDir/$Refind" --shortform elif [[ "$TargetDir" != "/EFI/BOOT" ]] ; then @@ -1219,7 +1220,14 @@ fi if [[ $UnmountEsp == '1' ]] ; then echo "Unmounting install dir" - umount $InstallDir + case "$OSTYPE" in + darwin*) + diskutil unmount $InstallDir + ;; + *) + umount $InstallDir + ;; + esac fi if [[ "$InstallDir" == /tmp/refind_install ]] ; then diff --git a/refind.inf b/refind.inf index 1b3f897..1112947 100644 --- a/refind.inf +++ b/refind.inf @@ -37,10 +37,13 @@ mok/guid.c mok/security_policy.c mok/simple_file.c + refind/apple.c refind/main.c refind/config.c refind/icns.c + refind/legacy.c refind/lib.c + refind/line_edit.c refind/menu.c refind/screen.c refind/driver_support.c