Changeset 2449 in MondoRescue for branches/2.2.9/mondo/src/restore-scripts
- Timestamp:
- Oct 6, 2009, 1:10:35 AM (16 years ago)
- Location:
- branches/2.2.9/mondo/src/restore-scripts/mondo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/restore-scripts/mondo/grub-MR
r2185 r2449 159 159 # --------------------------------- 160 160 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 161 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then 162 GRUBCFGFILE=/boot/grub/menu.lst 163 elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then 164 GRUBCFGFILE=/boot/grub/grub.cfg 165 else 166 echo "Unable to find Grub conf file" 167 exit -1 168 fi 169 echo "Trying to use the existing $GRUBCFGFILE file in batch mode" >> $LOGFILE 170 chroot /mnt/RESTORING grub --batch < /mnt/RESTORING$GRUBCFGFILE 163 171 res=$? 164 echo " menu.lstapproach returned $res" >> $LOGFILE172 echo "$GRUBCFGFILE approach returned $res" >> $LOGFILE 165 173 [ "$res" -eq "0" ] && exit 0 166 174 -
branches/2.2.9/mondo/src/restore-scripts/mondo/stabgrub-me
r2095 r2449 57 57 LocateOldGrub() { 58 58 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 62 66 if [ -L "$old_grubconf" ] ; then 63 67 l=`readlink "$old_grubconf"` … … 120 124 LogIt "OK so far: I've found all the files I need." 2 121 125 new_fstab=/mnt/RESTORING/etc/fstab.NEW 122 new_grubconf=/mnt/RESTORING/boot/grub/menu.lst.NEW 126 if [ -f /mnt/RESTORING/boot/grub/menu.lst ]; then 127 new_grubconf=/mnt/RESTORING/boot/grub/menu.lst.NEW 128 elif [ -f /mnt/RESTORING/boot/grub/grub.cfg ]; then 129 new_grubconf=/mnt/RESTORING/boot/grub/grub.cfg.NEW 130 fi 123 131 # change back to /tmp if /mnt/RESTORING/etc be problematic 124 132
Note:
See TracChangeset
for help on using the changeset viewer.