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/stabgrub-me

    r2095 r2451  
    5757LocateOldGrub() {
    5858    old_grubconf=""
    59     if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] ; then
    60         LogIt "No need for menu.lst search." 2
    61         old_grubconf=/mnt/RESTORING/boot/grub/menu.lst
     59    if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] || [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ] ; then
     60        LogIt "No need for menu.lst/grub.cfg search." 2
     61        if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then
     62            old_grubconf=/mnt/RESTORING/boot/grub/menu.lst
     63        elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then
     64            old_grubconf=/mnt/RESTORING/boot/grub/grub.cfg
     65        fi
    6266        if [ -L "$old_grubconf" ] ; then
    6367            l=`readlink "$old_grubconf"`
     
    120124LogIt "OK so far: I've found all the files I need." 2
    121125new_fstab=/mnt/RESTORING/etc/fstab.NEW
    122 new_grubconf=/mnt/RESTORING/boot/grub/menu.lst.NEW
     126if [ -f /mnt/RESTORING/boot/grub/menu.lst ]; then
     127    new_grubconf=/mnt/RESTORING/boot/grub/menu.lst.NEW
     128elif [ -f /mnt/RESTORING/boot/grub/grub.cfg ]; then
     129    new_grubconf=/mnt/RESTORING/boot/grub/grub.cfg.NEW
     130fi
    123131# change back to /tmp if /mnt/RESTORING/etc be problematic
    124132
Note: See TracChangeset for help on using the changeset viewer.