]> code.delx.au - refind/commitdiff
Improvements to refind-install: Improved SIP detection & fixed OS X
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 7 Nov 2015 20:03:55 +0000 (15:03 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 7 Nov 2015 20:03:55 +0000 (15:03 -0500)
"umount" problems.

refind-install
refind.inf

index c851952d7052eb7ea6ff5e362fa4940bf9167fb0..6297dc88f4241e2398c85f4aba57a71287c65b87 100755 (executable)
@@ -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
index 1b3f8976d8ddd856c03189b0631ba7d262d7b8aa..1112947b9603ecf40bf377970368c5901d36ecdc 100644 (file)
   mok/guid.c\r
   mok/security_policy.c\r
   mok/simple_file.c\r
+  refind/apple.c\r
   refind/main.c\r
   refind/config.c\r
   refind/icns.c\r
+  refind/legacy.c\r
   refind/lib.c\r
+  refind/line_edit.c\r
   refind/menu.c\r
   refind/screen.c\r
   refind/driver_support.c\r