Changeset 1842 in MondoRescue for branches/stable/mondo
- Timestamp:
- Dec 15, 2007, 2:24:34 AM (16 years ago)
- Location:
- branches/stable/mondo
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-devices.c
r1817 r1842 1871 1871 mr_asprintf(&tmp, "mount -t nfs -o nolock %s %s", bkpinfo->nfs_mount, 1872 1872 bkpinfo->isodir); 1873 run_program_and_log_output(tmp, 5);1873 run_program_and_log_output(tmp, 3); 1874 1874 mr_free(tmp); 1875 1875 malloc_string(g_selfmounted_isodir); -
branches/stable/mondo/src/common/libmondo-files.c
r1769 r1842 1107 1107 * networking will not start during an NFS restore. 1108 1108 * 1109 * If the NFS device in nfs_dev begins with the word "bond", 1109 * If the NFS device in nfs_dev begins with the word "bond", or alb or aft 1110 1110 * look for the corresponding slave ethN device and copy it to nfs_dev. 1111 1111 * Using the common MAC address 1112 1112 ********/ 1113 if (!strncmp(nfs_dev, "bond", 4) ) {1113 if (!strncmp(nfs_dev, "bond", 4) || !strncmp(nfs_dev, "alb", 3) || !strncmp(nfs_dev, "aft", 3)) { 1114 1114 log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", nfs_dev); 1115 1115 mr_asprintf(&command, -
branches/stable/mondo/src/common/libmondo-fork.c
r1693 r1842 19 19 //static char cvsid[] = "$Id$"; 20 20 21 extern char *g_tmpfs_mountpt;22 21 extern t_bkptype g_backup_media_type; 23 22 extern bool g_text_mode; -
branches/stable/mondo/src/common/libmondo-tools.c
r1817 r1842 1105 1105 if (tmp[0]) { 1106 1106 log_it("/boot is at %s according to /etc/fstab", tmp); 1107 if ((strstr(tmp, "LABEL=") || strstr(tmp,"UUID="))) { 1108 if (!run_program_and_log_output("mount /boot", 5)) { 1109 strcpy(g_boot_mountpt, "/boot"); 1110 mr_msg(1, "Mounted /boot"); 1107 mr_asprintf(&command, "mount | grep -Ew '/boot'"); 1108 mr_asprintf(&tmp1, call_program_and_get_last_line_of_output(command)); 1109 mr_free(command); 1110 if (!strcmp(tmp1,"")) { 1111 if ((strstr(tmp1, "LABEL=") || strstr(tmp1,"UUID="))) { 1112 if (!run_program_and_log_output("mount /boot", 5)) { 1113 strcpy(g_boot_mountpt, "/boot"); 1114 log_msg(1, "Mounted /boot"); 1115 } 1111 1116 } else { 1112 1117 log_it("...ignored cos it's a label or uuid :-)"); 1113 1118 } 1119 mr_free(tmp1); 1114 1120 } else { 1121 mr_free(tmp1); 1115 1122 mr_asprintf(&command, "mount | grep -E '^%s'", tmp); 1116 1123 mr_msg(3, "command = %s", command); … … 1133 1140 mr_msg(1, 1134 1141 "Plan B failed. Unable to mount /boot for backup purposes. This probably means /boot is mounted already, or doesn't have its own partition."); 1142 } 1135 1143 } 1136 1144 } -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r1817 r1842 25 25 extern bool g_text_mode; 26 26 extern char g_startdir[MAX_STR_LEN]; ///< ????? @bug ????? 27 extern char g_tmpfs_mountpt[MAX_STR_LEN];28 27 extern bool g_sigpipe; 29 28 -
branches/stable/mondo/src/mondoarchive/mondoarchive.c
r1770 r1842 43 43 extern char *g_boot_mountpt; 44 44 extern bool g_remount_cdrom_at_end, g_remount_floppy_at_end; 45 extern char *g_tmpfs_mountpt;46 45 extern char *g_cdrw_drive_is_here; 47 46 extern double g_kernel_version; -
branches/stable/mondo/src/mondorestore/mondo-prep.c
r1770 r1842 1925 1925 } else if (strcmp(format, "minix") == 0) { 1926 1926 mr_asprintf(&partcode, "81"); 1927 } else if (strcmp(format, "vmfs ") == 0) {1927 } else if (strcmp(format, "vmfs3") == 0) { 1928 1928 strcpy(partcode, "fb"); 1929 } else if (strcmp(format, "vmkcore") == 0) { 1930 strcpy(partcode, "fc"); 1929 1931 } else if (strcmp(format, "raid") == 0) { 1930 1932 mr_asprintf(&partcode, "fd"); -
branches/stable/mondo/src/mondorestore/mondo-restore-EXT.h
r1663 r1842 8 8 extern bool g_ISO_restore_mode; /* are we in Iso Mode? */ 9 9 extern bool g_I_have_just_nuked; 10 extern char *g_tmpfs_mountpt;11 10 extern char *g_isodir_device; 12 11 extern char *g_isodir_format; -
branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c
r1770 r1842 458 458 mr_msg(1, 459 459 "That's OK. I called mount w/o a filesystem type and it worked fine in the end."); 460 } else { 461 log_to_screen("Unable to mount device %s at %s", device, 462 mountdir); 460 463 } 461 464 } … … 475 478 /************************************************************************** 476 479 *END_MOUNT_DEVICE * 477 480 **************************************************************************/ 478 481 479 482 … … 500 503 sizeof(struct mountlist_itself)); 501 504 sort_mountlist_by_mountpoint(mountlist, 0); 505 502 506 503 507 mvaddstr_and_log_it(g_currentY, 0, _("Mounting devices ")); … … 545 549 } 546 550 close_progress_form(); 547 run_program_and_log_output("df -m", TRUE);548 551 if (retval) { 549 552 if (g_partition_table_locked_up > 0) { 550 553 log_to_screen 551 (_ 552 ("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to")); 553 log_to_screen(_ 554 ("lock up the partition table. You might have to reboot and use Interactive Mode to")); 555 log_to_screen(_ 556 ("format and restore *without* partitioning first. Sorry for the inconvenience.")); 554 (_("fdisk's ioctl() call to refresh its copy of the partition table causes the kernel to")); 555 log_to_screen 556 (_("lock up the partition table. You might have to reboot and use Interactive Mode to")); 557 log_to_screen 558 (_("format and restore *without* partitioning first. Sorry for the inconvenience.")); 557 559 } 558 560 mr_asprintf(&tmp, _("Could not mount devices %s- shall I abort?"), … … 563 565 retval = 0; 564 566 log_to_screen 565 (_ 566 ("Continuing, although some devices failed to be mounted")); 567 (_("Continuing, although some devices failed to be mounted")); 567 568 mvaddstr_and_log_it(g_currentY++, 74, _("Done.")); 568 569 } else { … … 580 581 return (retval); 581 582 } 582 583 584 585 586 587 /* 583 /************************************************************************** 584 *END_MOUNT_ALL_DEVICES * 585 **************************************************************************/ 586 587 588 /** 588 589 * Mount the CD-ROM or USB device at /mnt/cdrom. 589 590 * @param bkpinfo The backup information structure. Fields used: … … 594 595 * @return 0 for success, nonzero for failure. 595 596 */ 596 int mount_media()597 597 { 598 598 char *mount_cmd = NULL; … … 655 655 } else if (bkpinfo->backup_media_type == usb) { 656 656 mr_asprintf(&mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM); 657 } else if (strstr(bkpinfo->media_device, "/dev/")) 657 } else if (strstr(bkpinfo->media_device, "/dev/")) { 658 658 #ifdef __FreeBSD__ 659 {660 659 mr_asprintf(&mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, 661 660 MNT_CDROM); 662 }663 661 #else 664 {665 662 mr_asprintf(&mount_cmd, "mount %s -t iso9660 -o ro %s", 666 663 bkpinfo->media_device, MNT_CDROM); 667 }668 664 #endif 669 670 else { 665 } else { 671 666 if (bkpinfo->disaster_recovery 672 667 && does_file_exist("/tmp/CDROM-LIVES-HERE")) { … … 704 699 mr_msg(2, "Mounted media OK"); 705 700 } 701 706 702 return (res); 707 703 } -
branches/stable/mondo/src/restore-scripts/mondo/label-partitions-as-necessary
r1770 r1842 33 33 elif [ "$format" = "swap" ] ; then 34 34 if [ "$opttun" = "-U" ]; then 35 LogIt "Creating uuid $label on swap partition $ label"35 LogIt "Creating uuid $label on swap partition $mountpt" 36 36 echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036 37 37 else
Note:
See TracChangeset
for help on using the changeset viewer.