]> code.delx.au - refind/blobdiff - install.sh
Significant improvements to legacy-mode boot support, particularly on
[refind] / install.sh
index d1f706ca4397eb9dfe429292f47ca7e07ec7a11e..f538a43de920eff32a91a1d13025970c108f7cb8 100755 (executable)
@@ -35,6 +35,7 @@
 #
 # Revision history:
 #
+# 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
 #            to locate and mount ESP on Linux, if it's not mounted
 # 0.7.6   -- Added --ownhfs {device-filename} option
@@ -248,13 +249,16 @@ CopyKeys() {
 # honoring the $InstallDrivers condition. Must be passed a suitable
 # architecture code (ia32 or x64).
 CopyDrivers() {
+   local Blkid
+
+   Blkid=`which blkid 2> /dev/null`
    if [[ $InstallDrivers == "all" ]] ; then
       mkdir -p "$InstallDir/$TargetDir/drivers_$1"
       cp "$ThisDir"/drivers_$1/*_$1.efi "$InstallDir/$TargetDir/drivers_$1/" 2> /dev/null
       cp "$RefindDir"/drivers_$1/*_$1.efi "$InstallDir/$TargetDir/drivers_$1/" 2> /dev/null
-   elif [[ "$InstallDrivers" == "boot" && -x `which blkid` ]] ; then
+   elif [[ "$InstallDrivers" == "boot" && -x "$Blkid" ]] ; then
       BootPart=`df /boot | grep dev | cut -f 1 -d " "`
-      BootFS=`blkid -o export $BootPart 2> /dev/null | grep TYPE= | cut -f 2 -d =`
+      BootFS=`$Blkid -o export $BootPart 2> /dev/null | grep TYPE= | cut -f 2 -d =`
       DriverType=""
       case $BootFS in
          ext2 | ext3) DriverType="ext2"
@@ -698,9 +702,11 @@ FindLinuxESP() {
    local TableType
    local DmStatus
    local SkipIt
+   local Dmraid
    for Drive in `ls /dev/[sh]d?` ; do
       SkipIt=0
-      if [ -x `which dmraid` ] ; then
+      Dmraid=`which dmraid 2> /dev/null`
+      if [ -x "$Dmraid" ] ; then
          DmStatus=`dmraid -r | grep $Drive`
          if [ -n "$DmStatus" ] ; then
             echo "$Drive seems to be part of a RAID array; skipping!"
@@ -732,7 +738,7 @@ FindLinuxESP() {
 # Sets InstallDir to the ESP mount point.
 FindMountedESP() {
    mount /boot &> /dev/null
-#   mount /boot/efi &> /dev/null
+   mount /boot/efi &> /dev/null
    EspLine=`df "$RootDir/boot/efi" 2> /dev/null | grep boot/efi`
    if [[ ! -n "$EspLine" ]] ; then
       EspLine=`df "$RootDir"/boot | grep boot`