Changeset 1903 in MondoRescue for branches/stable/mondo/src/common
- Timestamp:
- Apr 10, 2008, 1:13:58 AM (16 years ago)
- Location:
- branches/stable/mondo/src/common
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-archive.c
r1770 r1903 42 42 #define DVDRWFORMAT 1 43 43 44 #ifndef __FreeBSD__45 44 #ifndef _SEMUN_H 46 45 #define _SEMUN_H … … 56 55 }; 57 56 #endif 58 #endif /* __FreeBSD__ */59 57 60 58 extern struct mr_ar_conf *mr_conf; … … 615 613 } 616 614 #else 615 #ifdef __IA64__ 616 strcpy(bootdev, call_program_and_get_last_line_of_output 617 ("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'")); 618 #else 617 619 strcpy(bootdev, call_program_and_get_last_line_of_output 618 620 ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'")); 621 #endif 619 622 if (strstr(bootdev, "/dev/cciss/")) { 623 #ifdef __IA64__ 624 strcpy(bootdev, call_program_and_get_last_line_of_output 625 ("mount | grep ' /boot/efi ' | head -1 | cut -d' ' -f1 | cut -dp -f1")); 626 #else 620 627 strcpy(bootdev, call_program_and_get_last_line_of_output 621 628 ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1")); 629 #endif 622 630 } 623 631 if (!bootdev[0]) { … … 3192 3200 /*@ bool ******************************************************** */ 3193 3201 bool that_one_was_ok; 3194 bool using_nfs;3195 3202 bool orig_vfy_flag_val; 3196 3203 … … 3204 3211 } 3205 3212 3206 if (strlen(bkpinfo->nfs_mount) > 1) {3207 using_nfs = TRUE;3208 } else {3209 using_nfs = FALSE;3210 }3211 3213 mr_msg(1, "OK, time to make %s #%d", 3212 3214 bkpinfo->backup_media_string, -
branches/stable/mondo/src/common/libmondo-devices.c
r1842 r1903 1576 1576 } 1577 1577 if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) { 1578 popup_and_OK(_("Please remove CDfrom drive"));1578 popup_and_OK(_("Please remove media from drive")); 1579 1579 } 1580 1580 mr_msg(3, "media type = %s", … … 1804 1804 1805 1805 case nfs: 1806 /* Never try to eject a NFS device */ 1807 bkpinfo->please_dont_eject = TRUE; 1808 1809 /* Initiate bkpinfo nfs_mount path from running environment if not already done */ 1806 1810 if (!bkpinfo->nfs_mount[0]) { 1807 1811 strcpy(bkpinfo->nfs_mount, … … 1840 1844 mr_free(command); 1841 1845 1842 mr_asprintf(&comment, 1846 if (!bkpinfo->restore_data) { 1847 mr_asprintf(&comment, 1843 1848 _("How much data (in Megabytes) will each media store?")); 1844 if (!popup_and_get_string(_("Size"), comment, sz_size, 5)) { 1845 log_to_screen(_("User has chosen not to backup the PC")); 1846 finish(1); 1849 if (!popup_and_get_string(_("Size"), comment, sz_size, 5)) { 1850 log_to_screen(_("User has chosen not to backup the PC")); 1851 finish(1); 1852 } 1853 } else { 1854 sz_size = 0; 1847 1855 } 1848 1856 mr_free(comment); … … 1863 1871 } 1864 1872 } 1865 if (!is_this_device_mounted(bkpinfo->nfs_mount)) { 1873 /* Initiate bkpinfo isodir path from running environment if mount already done */ 1874 if (is_this_device_mounted(bkpinfo->nfs_mount)) { 1875 strcpy(bkpinfo->isodir, 1876 call_program_and_get_last_line_of_output 1877 ("mount | grep \":\" | cut -d' ' -f3 | head -n1")); 1878 } else { 1866 1879 sprintf(bkpinfo->isodir, "%s/nfsdir", bkpinfo->tmpdir); 1867 1880 mr_asprintf(&command, "mkdir -p %s", bkpinfo->isodir); -
branches/stable/mondo/src/common/libmondo-filelist.c
r1817 r1903 1527 1527 time_t time_of_last_full_backup = 0; 1528 1528 struct stat statbuf; 1529 char *tmp1 = NULL; 1530 char *tmp2 = NULL; 1529 1531 1530 1532 malloc_string(sz_datefile); … … 1586 1588 mr_msg(2, "include_paths = '%s'", include_paths); 1587 1589 mr_msg(1, "Calculating filelist"); 1588 mr_asprintf(&exclude_paths, " %s %s %s %s %s %s %s . .. \ 1589 " MNT_CDROM " /mnt/floppy /media \ 1590 /proc /sys /tmp /var/log/lastlog /root/images/mondo " MINDI_CACHE " " MONDO_CACHE, excp, call_program_and_get_last_line_of_output("locate /win386.swp 2> /dev/null"), call_program_and_get_last_line_of_output("locate /hiberfil.sys 2> /dev/null"), call_program_and_get_last_line_of_output("locate /pagefile.sys 2> /dev/null"), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir); 1590 mr_asprintf(&tmp2, call_program_and_get_last_line_of_output("mount | grep -Ew 'ntfs|fat|vfat|dos' | awk '{print $3}'")); 1591 if (strlen(tmp2) < 1) { 1592 mr_asprintf(&tmp1,""); 1593 } else { 1594 mr_msg(2, "Found windows FS: %s",tmp2); 1595 mr_asprintf(&tmp1, "find %s -name '/win386.swp' -o -name '/hiberfil.sys' -o -name '/pagefile.sys' 2> /dev/null\n",tmp2); 1596 mr_free(tmp2); 1597 mr_asprintf(&tmp2, call_program_and_get_last_line_of_output(tmp1)); 1598 mr_msg(2, "Found windows files: %s",tmp2); 1599 } 1600 mr_free(tmp1); 1591 1601 1592 1602 mr_msg(2, "Excluding paths = '%s'", exclude_paths); 1603 mr_asprintf(&exclude_paths, " %s %s %s %s %s %s . .. \ 1604 " MNT_CDROM " " MNT_FLOPPY " /media /tmp /var/log/lastlog \ 1605 /proc /sys /root/images/mondo ", MINDI_CACHE, MONDO_CACHE, excp, tmp2, (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir); 1606 paranoid_free(tmp2); 1607 1593 1608 mr_msg(2, 1594 1609 "Generating skeleton filelist so that we can track our progress"); -
branches/stable/mondo/src/common/libmondo-stream.c
r1663 r1903 885 885 return (1); 886 886 } 887 /* Not used 887 888 mr_asprintf(&tmp, "Reading file from tape; writing to '%s'; %ld KB", 888 889 outfname, (long) size >> 10); 889 log_to_screen(tmp); 890 mr_free(tmp); 890 */ 891 891 892 892 if (foutstream) { -
branches/stable/mondo/src/common/libmondo-tools.c
r1842 r1903 901 901 902 902 // abort if Windows partition but no ms-sys and parted 903 if (!run_program_and_log_output 904 ("mount | grep -w vfat | grep -vE \"/dev/fd|nexdisk\"", 0) 905 || 906 !run_program_and_log_output 907 ("mount | grep -w dos | grep -vE \"/dev/fd|nexdisk\"", 0)) { 903 if (!run_program_and_log_output("mount | grep -Ew 'vfat|fat|dos' | grep -vE \"/dev/fd|nexdisk\"", 0)) { 908 904 log_to_screen(_("I think you have a Windows 9x partition.")); 909 905 retval += whine_if_not_found("parted"); 910 #ifndef __IA64__911 /* IA64 always has one vfat partition for EFI even without Windows */912 // retval +=913 if (!find_home_of_exe("ms-sys")) {914 log_to_screen("Please install ms-sys just in case.");915 }916 #endif917 906 } 918 907 -
branches/stable/mondo/src/common/newt-specific.c
r1770 r1903 259 259 kill_anything_like_this(char *str) { 260 260 261 char *tmp = NULL; 262 263 mr_asprintf(&tmp,"kill `ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"`", ps_options, str, ps_proc_id); 261 char *tmp = NULL; 262 char *tmp1 = NULL; 263 264 mr_asprintf(&tmp,"ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"", ps_options, str, ps_proc_id); 264 265 run_program_and_log_output(tmp, TRUE); 266 if (strlen(tmp) > 0) { 267 mr_asprintf(&tmp1,"kill `%s`", tmp); 268 run_program_and_log_output(tmp1, TRUE); 269 paranoid_free(tmp1); 270 } 265 271 mr_free(tmp); 266 272 }
Note:
See TracChangeset
for help on using the changeset viewer.