Changeset 2944 in MondoRescue for branches/3.0/mondo/src/restore-scripts/mondo/stabgrub-me
- Timestamp:
- Feb 3, 2012, 2:12:47 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/restore-scripts/mondo/stabgrub-me
r2449 r2944 57 57 LocateOldGrub() { 58 58 old_grubconf="" 59 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] || [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ] ; then59 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] || [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ] || [ -f "/mnt/RESTORING/boot/grub2/grub.cfg" ] ; then 60 60 LogIt "No need for menu.lst/grub.cfg search." 2 61 61 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then … … 63 63 elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then 64 64 old_grubconf=/mnt/RESTORING/boot/grub/grub.cfg 65 elif [ -f "/mnt/RESTORING/boot/grub2/grub.cfg" ]; then 66 old_grubconf=/mnt/RESTORING/boot/grub2/grub.cfg 65 67 fi 66 68 if [ -L "$old_grubconf" ] ; then … … 68 70 if [ _"`echo $l | cut -c1`" = _"/" ]; then 69 71 # If readlink gives an absolute path it's related to the chroot 70 old_grubconf=/mnt/RESTORING/$l72 old_grubconf=/mnt/RESTORING/$l 71 73 else 72 74 # If readlink gives a relative path, it's in the same dir 73 old_grubconf=/mnt/RESTORING/boot/grub/$l 75 d=`dirname "$old_grubconf"` 76 old_grubconf=$d/$l 74 77 fi 75 fi 78 fi 76 79 return 0 77 80 fi … … 128 131 elif [ -f /mnt/RESTORING/boot/grub/grub.cfg ]; then 129 132 new_grubconf=/mnt/RESTORING/boot/grub/grub.cfg.NEW 133 elif [ -f /mnt/RESTORING/boot/grub2/grub.cfg ]; then 134 new_grubconf=/mnt/RESTORING/boot/grub2/grub.cfg.NEW 130 135 fi 131 136 # change back to /tmp if /mnt/RESTORING/etc be problematic
Note:
See TracChangeset
for help on using the changeset viewer.