Changeset 1548 in MondoRescue for branches/stable/mondo/src/mondorestore


Ignore:
Timestamp:
Jul 24, 2007, 1:39:36 AM (17 years ago)
Author:
Bruno Cornec
Message:
  • Add the possibiilty to edit in interactive mode mtab and device.map for grub
  • Remove blkid cache files after restore to avoid problems in cloning mode
  • Fix what seems to appear a huge number of bugs in hack-fstab (illustration of 1 LOC = 1 bug :-)
  • Especially improve LABEL and UUID support.
  • Should fix #185
  • Exclude_path should be 4*MAX_STR_LEN everywhere. Fixed now.
  • Increasing that value will allow to having larger exclude paths.
  • Should solve bug #137 (and maybe #3 as well)
  • Adds support for fedora 7

(merge -r 1533:1547 $SVN_M/branches/2.2.5)

Location:
branches/stable/mondo/src/mondorestore
Files:
2 edited

Legend:

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

    r1500 r1548  
    14101410        mvaddstr_and_log_it(g_currentY,
    14111411                            0,
    1412                             _
    1413                             ("Modifying fstab and grub.conf, and running GRUB...                             "));
     1412                            ("Modifying fstab, mtab, device.map and grub.conf, and running GRUB...                             "));
    14141413        for (done = FALSE; !done;) {
    14151414            popup_and_get_string(_("Boot device"),
     
    14301429                done = TRUE;
    14311430            }
    1432             popup_and_OK(_("You will now edit fstab and grub.conf"));
     1431            popup_and_OK(_("You will now edit fstab, mtab, device.map and grub.conf"));
    14331432            if (!g_text_mode) {
    14341433                newtSuspend();
     
    14381437            mr_free(tmp);
    14391438
     1439            mr_asprintf(&tmp, "chroot %s %s /etc/mtab", MNT_RESTORING, editor);
     1440            paranoid_system(tmp);
     1441            mr_free(tmp);
     1442
    14401443            mr_asprintf(&tmp, "chroot %s %s /etc/grub.conf", MNT_RESTORING, editor);
     1444            paranoid_system(tmp);
     1445            mr_free(tmp);
     1446
     1447            mr_asprintf(&tmp, "chroot %s %s /boot/grub/device.map", MNT_RESTORING, editor);
    14411448            paranoid_system(tmp);
    14421449            mr_free(tmp);
  • branches/stable/mondo/src/mondorestore/mondorestore.c

    r1458 r1548  
    345345 *END_  EXTRACT_CONFIG_FILE_FROM_RAMDISK                                  *
    346346 **************************************************************************/
     347
     348static void clean_blkid(struct s_bkpinfo *bkpinfo) {
     349
     350    char *tmp1 = NULL;
     351
     352    /* Clean up blkid cache file if they exist */
     353    mr_asprintf(&tmp1,"%s/etc/blkid.tab",bkpinfo->restore_path);
     354    (void)unlink(tmp1);
     355    mr_free(tmp1);
     356    mr_asprintf(&tmp1,"%s/etc/blkid.tab.old",bkpinfo->restore_path);
     357    (void)unlink(tmp1);
     358    mr_free(tmp1);
     359}
    347360
    348361
     
    586599    }
    587600
     601    clean_blkid(bkpinfo);
    588602    protect_against_braindead_sysadmins();
    589603    retval += unmount_all_devices(mountlist);
     
    839853        boot_loader_installed = TRUE;
    840854    }
     855    clean_blkid(bkpinfo);
    841856    protect_against_braindead_sysadmins();
    842857    retval += unmount_all_devices(mountlist);
Note: See TracChangeset for help on using the changeset viewer.