Ignore:
Timestamp:
Jun 7, 2014, 10:39:10 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • stabgrub-me now supports also grub2
  • Fix an error using mountlist.txt under /var/cache/mindi instead of /tmp - for now - with grub-MR
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c

    r3292 r3297  
    13841384    strcpy(boot_device, bd);
    13851385
    1386     if (offer_to_run_stabgrub
    1387         && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) {
     1386    if (offer_to_run_stabgrub && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) {
    13881387        /* interactive mode */
    1389         mvaddstr_and_log_it(g_currentY,
    1390                             0,
    1391                             "Modifying fstab, mtab, device.map and menu.lst/grub.cfg, and running GRUB...                             ");
     1388        mvaddstr_and_log_it(g_currentY, 0, "Modifying fstab, mtab, device.map and menu.lst/grub.cfg, and running GRUB...");
    13921389        /*  Did we changed the mountlist ? If yes, then force editing conf files */
    13931390        if ((fin = fopen(MONDO_MNTLISTCHG, "r")) != NULL) {
     
    13951392        }
    13961393        for (done = FALSE; !done;) {
    1397             popup_and_get_string("Boot device", "Please confirm/enter the boot device. If in doubt, try /dev/hda", boot_device, MAX_STR_LEN / 4);
     1394            popup_and_get_string("Boot device", "Please confirm/enter the boot device. If in doubt, try /dev/sda", boot_device, MAX_STR_LEN / 4);
    13981395            /*  Only try to adapt grub here first if the mountlist wasn't changed before */
    13991396            if (! mntlistchg) {
     
    14651462        if (!run_program_and_log_output("which grub-MR", FALSE)) {
    14661463            log_msg(1, "Yay! grub-MR found...");
    1467             mr_asprintf(command, "grub-MR %s "MINDI_CACHE"/mountlist.txt", boot_device);
     1464            mr_asprintf(command, "grub-MR %s /"MOUNTLIST_FNAME_STUB, boot_device);
    14681465            log_msg(1, "command = %s", command);
    14691466        } else {
     1467            // Or grub2-install
    14701468            mr_asprintf(command, "chroot " MNT_RESTORING " grub-install %s", boot_device);
    14711469            log_msg(1, "WARNING - grub-MR not found; using grub-install");
     
    17491747    } else {
    17501748        /* nuke mode */
    1751         mr_asprintf(command, "raw-MR %s "MINDI_CACHE"/mountlist.txt", boot_device);
     1749        mr_asprintf(command, "raw-MR %s /"MOUNTLIST_FNAME_STUB, boot_device);
    17521750        log_msg(2, "run_raw_mbr() --- command='%s'", command);
    17531751
     
    18091807    } else {
    18101808        sprintf(g_mondo_cfg_file, "%s/%s", temppath, MONDO_CFG_FILE_STUB);
    1811         sprintf(g_mountlist_fname, "%s/%s", temppath,
    1812                 MOUNTLIST_FNAME_STUB);
     1809        sprintf(g_mountlist_fname, "%s/%s", temppath, MOUNTLIST_FNAME_STUB);
    18131810    }
    18141811}
Note: See TracChangeset for help on using the changeset viewer.