When there are multiple devices mounted on /, as there can
be during a preupgrade, the last device is the one that should
match the grub.cfg entry. This was preventing preupgrade from
installing the new f17 kernel.
@@ -1487,13 +1489,8 @@ static char *findDiskForRoot()
* for '/' obviously.
*/
if (*(++chptr) == '/' && *(++chptr) == ' ') {
- /*
- * Move back 2, which is the first space after the device name, set
- * it to so strdup will just get the devicename.
- */
- chptr -= 2;
- *chptr = ' ';
- return strdup(devname);
+ /* remember the last / entry in mtab */
+ foundanswer = devname;
}
/* Next line */
@@ -1502,6 +1499,13 @@ static char *findDiskForRoot()
chptr++;
}
+ /* Return the last / entry found */
+ if (foundanswer) {
+ chptr = strchr(foundanswer, ' ');
+ *chptr = ' ';
+ return strdup(foundanswer);
+ }
+
return NULL;
}
--
1.7.7.6
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list