Ignore:
Timestamp:
Jun 19, 2013, 8:34:46 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • First pass on svn merge -r 2935:3146 ../3.0
File:
1 edited

Legend:

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

    r2937 r3147  
    107107if [ "$MNT_RESTORING" ] ; then
    108108    if [ -x $MNT_RESTORING/usr/sbin/grub-install.unsupported ]; then
    109         echo "Now I'll use grub-install.unsupported in chroot" >> $LOGFILE
    110         chroot $MNT_RESTORING /usr/sbin/grub-install.unsupported $1 >> $LOGFILE 2>> $LOGFILE
     109        echo "Now I'll use OpenSuSE/SLES new grub-install in chroot" >> $LOGFILE
     110        chroot $MNT_RESTORING /usr/sbin/grub-install >> $LOGFILE 2>> $LOGFILE
    111111        res=$?
    112         echo "grub-install.unsupported in chroot returned $res" >> $LOGFILE
     112        echo "grub-install in chroot returned $res" >> $LOGFILE
    113113    fi
    114114else
    115115    if [ -x /usr/sbin/grub-install.unsupported ]; then
    116         echo "Now I'll use grub-install.unsupported locally" >> $LOGFILE
    117         /usr/sbin/grub-install.unsupported $1 >> $LOGFILE 2>> $LOGFILE
     116        echo "Now I'll use OpenSuSE/SLES new grub-install locally" >> $LOGFILE
     117        /usr/sbin/grub-install >> $LOGFILE 2>> $LOGFILE
    118118        res=$?
    119         echo "grub-install.unsupported returned $res" >> $LOGFILE
     119        echo "grub-install returned $res" >> $LOGFILE
    120120    fi
    121121fi
     
    124124echo "Now I'll use grub-install" >> $LOGFILE
    125125if [ "$MNT_RESTORING" ] ; then
     126    echo "Launching: chroot $MNT_RESTORING grub-install $1" >> $LOGFILE
    126127    chroot $MNT_RESTORING grub-install $1 >> $LOGFILE 2>> $LOGFILE
    127128    res=$?
    128129else
     130    echo "Launching: grub-install $1" >> $LOGFILE
    129131    grub-install $1 >> $LOGFILE 2>> $LOGFILE
    130132    res=$?
    131133fi
    132134echo "grub-install returned $res" >> $LOGFILE
     135[ "$res" -eq "0" ] && exit 0
     136
     137
     138echo "Now I'll use grub2-install" >> $LOGFILE
     139if [ "$MNT_RESTORING" ] ; then
     140    chroot $MNT_RESTORING grub2-install $1 >> $LOGFILE 2>> $LOGFILE
     141    res=$?
     142else
     143    grub2-install $1 >> $LOGFILE 2>> $LOGFILE
     144    res=$?
     145fi
     146echo "grub2-install returned $res" >> $LOGFILE
    133147[ "$res" -eq "0" ] && exit 0
    134148
     
    190204elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then
    191205    grep -vE '^#' /boot/grub/grub.cfg > /mnt/RESTORING/tmp/grub.conf
     206elif [ -f "/mnt/RESTORING/boot/grub2/grub.cfg" ]; then
     207    grep -vE '^#' /boot/grub2/grub.cfg > /mnt/RESTORING/tmp/grub.conf
    192208else
    193209    echo "Unable to find Grub conf file" | tee -a $LOGFILE
Note: See TracChangeset for help on using the changeset viewer.