Changeset 3147 in MondoRescue for branches/3.1/mondo/src/restore-scripts/mondo/grub-MR
- Timestamp:
- Jun 19, 2013, 8:34:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mondo/src/restore-scripts/mondo/grub-MR
r2937 r3147 107 107 if [ "$MNT_RESTORING" ] ; then 108 108 if [ -x $MNT_RESTORING/usr/sbin/grub-install.unsupported ]; then 109 echo "Now I'll use grub-install.unsupportedin chroot" >> $LOGFILE110 chroot $MNT_RESTORING /usr/sbin/grub-install .unsupported $1>> $LOGFILE 2>> $LOGFILE109 echo "Now I'll use OpenSuSE/SLES new grub-install in chroot" >> $LOGFILE 110 chroot $MNT_RESTORING /usr/sbin/grub-install >> $LOGFILE 2>> $LOGFILE 111 111 res=$? 112 echo "grub-install .unsupportedin chroot returned $res" >> $LOGFILE112 echo "grub-install in chroot returned $res" >> $LOGFILE 113 113 fi 114 114 else 115 115 if [ -x /usr/sbin/grub-install.unsupported ]; then 116 echo "Now I'll use grub-install.unsupportedlocally" >> $LOGFILE117 /usr/sbin/grub-install .unsupported $1>> $LOGFILE 2>> $LOGFILE116 echo "Now I'll use OpenSuSE/SLES new grub-install locally" >> $LOGFILE 117 /usr/sbin/grub-install >> $LOGFILE 2>> $LOGFILE 118 118 res=$? 119 echo "grub-install .unsupportedreturned $res" >> $LOGFILE119 echo "grub-install returned $res" >> $LOGFILE 120 120 fi 121 121 fi … … 124 124 echo "Now I'll use grub-install" >> $LOGFILE 125 125 if [ "$MNT_RESTORING" ] ; then 126 echo "Launching: chroot $MNT_RESTORING grub-install $1" >> $LOGFILE 126 127 chroot $MNT_RESTORING grub-install $1 >> $LOGFILE 2>> $LOGFILE 127 128 res=$? 128 129 else 130 echo "Launching: grub-install $1" >> $LOGFILE 129 131 grub-install $1 >> $LOGFILE 2>> $LOGFILE 130 132 res=$? 131 133 fi 132 134 echo "grub-install returned $res" >> $LOGFILE 135 [ "$res" -eq "0" ] && exit 0 136 137 138 echo "Now I'll use grub2-install" >> $LOGFILE 139 if [ "$MNT_RESTORING" ] ; then 140 chroot $MNT_RESTORING grub2-install $1 >> $LOGFILE 2>> $LOGFILE 141 res=$? 142 else 143 grub2-install $1 >> $LOGFILE 2>> $LOGFILE 144 res=$? 145 fi 146 echo "grub2-install returned $res" >> $LOGFILE 133 147 [ "$res" -eq "0" ] && exit 0 134 148 … … 190 204 elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then 191 205 grep -vE '^#' /boot/grub/grub.cfg > /mnt/RESTORING/tmp/grub.conf 206 elif [ -f "/mnt/RESTORING/boot/grub2/grub.cfg" ]; then 207 grep -vE '^#' /boot/grub2/grub.cfg > /mnt/RESTORING/tmp/grub.conf 192 208 else 193 209 echo "Unable to find Grub conf file" | tee -a $LOGFILE
Note:
See TracChangeset
for help on using the changeset viewer.