--- trunk/grubby/grubby.c 2012/07/02 13:09:12 1850 +++ trunk/grubby/grubby.c 2012/07/02 13:09:47 1851 @@ -2350,13 +2350,13 @@ char * boot = NULL; int lba; - if (!isSuseSystem()) { - if (parseSysconfigGrub(&lba, &boot)) { + if (isSuseSystem()) { + if (parseSuseGrubConf(&lba, &boot)) { free(boot); return; } } else { - if (parseSuseGrubConf(&lba, &boot)) { + if (parseSysconfigGrub(&lba, &boot)) { free(boot); return; } @@ -3179,13 +3179,15 @@ int fd; unsigned char bootSect[512]; char * boot; - int onSuse; + int onSuse = isSuseSystem(); - onSuse = isSuseSystem(); - if (!onSuse) { - if (parseSysconfigGrub(NULL, &boot)) return 0; + + if (onSuse) { + if (parseSuseGrubConf(NULL, &boot)) + return 0; } else { - if (parseSuseGrubConf(NULL, &boot)) return 0; + if (parseSysconfigGrub(NULL, &boot)) + return 0; } /* assume grub is not installed -- not an error condition */ @@ -3205,14 +3207,13 @@ } close(fd); - if (!onSuse) - return checkDeviceBootloader(boot, bootSect); - else - /* - * The more elaborate checks do not work on SuSE. The checks done - * seem to be reasonble (at least for now), so just return success - */ + /* The more elaborate checks do not work on SuSE. The checks done + * seem to be reasonble (at least for now), so just return success + */ + if (onSuse) return 2; + + return checkDeviceBootloader(boot, bootSect); } int checkForExtLinux(struct grubConfig * config) {