]> code.delx.au - refind/commitdiff
install.sh: Fixed bug in creation of tools directory when $InstallDir has a space.
authorsrs5694 <srs5694@users.sourceforge.net>
Tue, 9 Dec 2014 15:35:58 +0000 (10:35 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Tue, 9 Dec 2014 15:35:58 +0000 (10:35 -0500)
docs/refind/installing.html
install.sh

index bbb3fba8e892cd62388c0491bd52e4f9317f689c..422133af39b468d44ac575310a94144e6a950f00 100644 (file)
@@ -1087,7 +1087,7 @@ $ <b>ioreg -l -p IODeviceTree | grep firmware-abi</b>
 $ <tt class="userinput">sudo rm -r /Volumes/esp/EFI/refind</tt>
 </pre>
 
-<p>Many variants of both of these commands are possible on both OS X and Linux. For instance, you'd probably use <tt>sudo</tt> on Ubuntu.</p>
+<p>Many variants of both of these commands are possible on both OS X and Linux. For instance, you'd probably use <tt>sudo</tt> on Ubuntu. Note that dragging the rEFInd files to the Trash in OS X does <i>not</i> delete them; it just moves them to a different folder. Given the way that Macs reference boot loaders, this means that rEFInd may still launch. If you want to use the Finder to delete rEFInd, be sure to empty the trash after you drag the files there. That should do the job, provided there's no second installation hiding somewhere.</p>
 
 <p>If you installed via an RPM or Debian package in Linux, using your package manager will remove the package files, but not the files that the installer places on your ESP. Thus, you must uninstall those files manually, as just described. To complete the job, you'll also have to remove <tt>/boot/refind_linux.conf</tt>, and perhaps the <tt>/etc/refind.d</tt> directory.</p>
 
index dcfec930a11be7afaac460084965fb3b14a806ea..ede3e083780bff8c4b25cdd895303e903b803d2b 100755 (executable)
@@ -35,6 +35,7 @@
 #
 # Revision history:
 #
+# 0.8.5   -- Refinement/cleanup of new OS X ESP-as-default policy
 # 0.8.4   -- OS X default changed to install to ESP under /EFI/BOOT
 # 0.7.9   -- Fixed bug that caused errors if dmraid utility not installed
 # 0.7.7   -- Fixed bug that created mangled refind_linux.conf file; added ability
@@ -306,7 +307,7 @@ CopyDrivers() {
 # directory on the ESP. Must be passed a suitable architecture code (ia32
 # or x64).
 CopyTools() {
-   mkdir -p $InstallDir/EFI/tools
+   mkdir -p "$InstallDir/EFI/tools"
    if [[ $OSName == 'Darwin' ]] ; then
       cp -f "$RefindDir/tools_$1/gptsync_$1.efi" "$InstallDir/EFI/tools/"
       if [[ -f "$InstallDir/EFI/tools/gptsync.efi" ]] ; then
@@ -494,9 +495,16 @@ MountOSXESP() {
    if [[ "$InstallDir" == '' ]] ; then
       mkdir /Volumes/ESP &> /dev/null
       mount -t msdos "$Esp" /Volumes/ESP
+      # Some systems have HFS+ "ESPs." They shouldn't, but they do. If this is
+      # detected, mount it as such and set appropriate options.
       if [[ $? != 0 ]] ; then
-         echo "Unable to mount ESP! Aborting!\n"
-         exit 1
+         mount -t hfs "$Esp" /Volumes/Esp
+         OwnHfs=1
+         InstallToEspOnMac=0
+         if [[ $? != 0 ]] ; then
+            echo "Unable to mount ESP! Aborting!\n"
+            exit 1
+         fi
       fi
       UnmountEsp=1
       InstallDir="/Volumes/ESP"