Changeset 2137


Ignore:
Timestamp:
Feb 2, 2009, 5:07:34 PM (11 years ago)
Author:
Bruno Cornec
Message:

Adds support for multipath type ofdrivers to grub-MR

File:
1 edited

Legend:

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

    r2095 r2137  
    1818    BOOTPATHNAME=""
    1919    for sz in /boot / ; do
    20     bootpart=`grep " $sz " $2 | cut -d' ' -f1 | head -n1`
    21     [ "$bootpart" ] && [ -e "/mnt/RESTORING/$bootpart" ] && break
     20        bootpart=`grep " $sz " $2 | cut -d' ' -f1 | head -n1`
     21        [ "$bootpart" ] && [ -e "/mnt/RESTORING/$bootpart" ] && break
    2222    done
    2323    [ ! "$bootpart" ] && Die "Cannot find boot partition in mountlist"
    2424
    2525    if [ "$sz" = "/boot" ] ; then
    26     BOOTPATHNAME=/grub
     26        BOOTPATHNAME=/grub
    2727    else
    28     BOOTPATHNAME=/boot/grub
     28        BOOTPATHNAME=/boot/grub
    2929    fi
    3030    if [ -e "$MNT_RESTORING/boot/grub/stage1" ] ; then
    31     echo "Alright then."
    32     return
     31        echo "Alright then."
     32        return
    3333    fi
    3434   
    3535    cd $MNT_RESTORING
    3636    for i in usr/lib/grub/* ; do
    37     echo "Checking $i"
     37        echo "Checking $i"
    3838        if [ -e "$i/stage1" ] ; then
    39         BOOTPATHNAME=/$i
    40         mkdir -p /boot/grub
    41         cp -au $i/* /boot/grub/
    42         echo "BOOTPATHNAME is now $BOOTPATHNAME"
    43         return 0
    44     fi
     39            BOOTPATHNAME=/$i
     40            mkdir -p /boot/grub
     41            cp -au $i/* /boot/grub/
     42            echo "BOOTPATHNAME is now $BOOTPATHNAME"
     43            return 0
     44        fi
    4545    done
    4646    cd /
     
    114114if echo $bootpart | grep "/cciss/" > /dev/null ; then
    115115    partno=`basename $bootpart | cut -d'p' -f2`
     116elif echo $bootpart | grep "/mapper/mpath" > /dev/null ; then
     117    partno=`basename $bootpart | cut -d'p' -f2`
    116118else
    117119    partno=`basename $bootpart | sed s/[a-z]*//`
     
    164166[ "$res" -eq "0" ] && exit 0
    165167
    166 #echo "Now I'll use grub-install" >> $LOGFILE
    167 #chroot /mnt/RESTORING grub-install $1 >> $LOGFILE
    168 #res=$?
    169 #echo "grub-install returned $res" >> $LOGFILE
    170 #[ "$res" -eq "0" ] && exit 0
    171 
    172168echo "grub-MR returned res=$res" >> $LOGFILE
    173169
Note: See TracChangeset for help on using the changeset viewer.