Changeset 2920


Ignore:
Timestamp:
Dec 22, 2011, 1:14:44 PM (5 years ago)
Author:
bruno
Message:
  • Fix grub installation if we had to go in the hack part which wasn't using the correct variables to make decisions !
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/restore-scripts/mondo/grub-MR

    r2671 r2920  
    2929    fi
    3030    if [ -e "$MNT_RESTORING/boot/grub/stage1" ] ; then
    31         echo "Alright then."
     31        echo "All right then."
    3232        return
    3333    fi
     
    136136FindBootPart $1 $2 2>&1 | tee -a $LOGFILE
    137137mbrdev=`echo $1 | sed 's/\([^0-9]*\)[0-9]*$/\1/'`
    138 if echo $bootpart | grep "/cciss/" > /dev/null ; then
    139     partno=`basename $bootpart | cut -d'p' -f2`
     138if echo $mbrdev | grep "/cciss/" > /dev/null ; then
     139    partno=`basename $mbrdev | cut -d'p' -f2`
    140140    mbrdev=`echo $mbrdev | cut -d'p' -f1`
    141 elif echo $bootpart | grep "/mapper/mpath" > /dev/null ; then
    142     partno=`basename $bootpart | cut -d'p' -f3`
    143     mbrdev=`echo $mbrdev | cut -d'p' -f1`
    144 else
    145     partno=`basename $bootpart | sed 's/[a-z]*//'`
     141elif echo $mbrdev | grep "/mapper/mpath" > /dev/null ; then
     142    partno=`basename $mbrdev | cut -d'p' -f3`
     143    mbrdev=`echo $mbrdev | cut -d'p' -f1-4`
     144else
     145    partno=`basename $mbrdev | sed 's/[a-z]*//'`
    146146fi
    147147if [ ! "$partno" ] ; then
     
    150150    partno=$(($partno-1))
    151151fi
    152 if echo $bootpart | grep "/md" > /dev/null ; then
     152if echo $mbrdev | grep "/md" > /dev/null ; then
    153153    # FIXME: Why this if not used later
    154154    base=`basename $bootpart`
Note: See TracChangeset for help on using the changeset viewer.