Ignore:
Timestamp:
Oct 6, 2009, 1:34:09 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Fix a mr_asprintf usage without & causing a seg fault.
  • Adds support for grub2 conf file grub.cfg in addition to menu.lst
  • Fix for #288: only take the first result in SizeOfPartition in case of multiple mounts
  • Improve USB log in case of error by adding the conf file

(Backport from 2.2.9)

File:
1 edited

Legend:

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

    r2185 r2451  
    159159# ---------------------------------
    160160
    161 echo "Trying to use the existing menu.lst file in batch mode" >> $LOGFILE
    162 chroot /mnt/RESTORING grub --batch < /mnt/RESTORING/boot/grub/menu.lst
     161if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then
     162    GRUBCFGFILE=/boot/grub/menu.lst
     163elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then
     164    GRUBCFGFILE=/boot/grub/grub.cfg
     165else
     166    echo "Unable to find Grub conf file"
     167    exit -1
     168fi
     169echo "Trying to use the existing $GRUBCFGFILE file in batch mode" >> $LOGFILE
     170chroot /mnt/RESTORING grub --batch < /mnt/RESTORING$GRUBCFGFILE
    163171res=$?
    164 echo "menu.lst approach returned $res" >> $LOGFILE
     172echo "$GRUBCFGFILE approach returned $res" >> $LOGFILE
    165173[ "$res" -eq "0" ] && exit 0
    166174
Note: See TracChangeset for help on using the changeset viewer.