]> code.delx.au - refind/commitdiff
Fixed bug in install.sh that could cause it to display errors if the
authorsrs5694 <srs5694@users.sourceforge.net>
Thu, 3 Apr 2014 12:40:09 +0000 (08:40 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Thu, 3 Apr 2014 12:40:09 +0000 (08:40 -0400)
dmraid utility was not installed.

NEWS.txt
install.sh

index a7fab5fa745445dbb6d72802f405aba45debaf0c..a5acbaced5b0b6f7c10f15d5b5a3c4f61b874e75 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,9 @@
 0.7.9 (?/??/2014):
 ------------------
 
 0.7.9 (?/??/2014):
 ------------------
 
+- Fixed bug in install.sh that could cause it to display error messages
+  if the dmraid utility was not installed.
+
 - Fixed some EFI filesystem driver bugs that could cause lockups under
   some circumstances. These bugs could affect any of the filesystem
   drivers.
 - Fixed some EFI filesystem driver bugs that could cause lockups under
   some circumstances. These bugs could affect any of the filesystem
   drivers.
index 955572ef4f9c0eb1543a3e0a20d05cdbca8ea3bf..6ca86f50d38698f4fa27f528fd8181db64b7726b 100755 (executable)
@@ -248,13 +248,16 @@ CopyKeys() {
 # honoring the $InstallDrivers condition. Must be passed a suitable
 # architecture code (ia32 or x64).
 CopyDrivers() {
 # 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
    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 " "`
       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"
       DriverType=""
       case $BootFS in
          ext2 | ext3) DriverType="ext2"
@@ -698,9 +701,11 @@ FindLinuxESP() {
    local TableType
    local DmStatus
    local SkipIt
    local TableType
    local DmStatus
    local SkipIt
+   local Dmraid
    for Drive in `ls /dev/[sh]d?` ; do
       SkipIt=0
    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!"
          DmStatus=`dmraid -r | grep $Drive`
          if [ -n "$DmStatus" ] ; then
             echo "$Drive seems to be part of a RAID array; skipping!"