Changeset 1903 in MondoRescue for branches/stable/mondo/src/common


Ignore:
Timestamp:
Apr 10, 2008, 1:13:58 AM (16 years ago)
Author:
Bruno Cornec
Message:

merge -r 1842:1889 2.2.5

Location:
branches/stable/mondo/src/common
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1770 r1903  
    4242#define DVDRWFORMAT 1
    4343
    44 #ifndef __FreeBSD__
    4544#ifndef _SEMUN_H
    4645#define _SEMUN_H
     
    5655};
    5756#endif
    58 #endif                          /* __FreeBSD__ */
    5957
    6058extern struct mr_ar_conf *mr_conf;
     
    615613        }
    616614#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
    617619        strcpy(bootdev, call_program_and_get_last_line_of_output
    618620               ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'"));
     621#endif
    619622        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
    620627            strcpy(bootdev, call_program_and_get_last_line_of_output
    621628                   ("mount | grep ' /boot ' | head -1 | cut -d' ' -f1 | cut -dp -f1"));
     629#endif
    622630        }
    623631        if (!bootdev[0]) {
     
    31923200    /*@ bool ******************************************************** */
    31933201    bool that_one_was_ok;
    3194     bool using_nfs;
    31953202    bool orig_vfy_flag_val;
    31963203
     
    32043211    }
    32053212
    3206     if (strlen(bkpinfo->nfs_mount) > 1) {
    3207         using_nfs = TRUE;
    3208     } else {
    3209         using_nfs = FALSE;
    3210     }
    32113213    mr_msg(1, "OK, time to make %s #%d",
    32123214            bkpinfo->backup_media_string,
  • branches/stable/mondo/src/common/libmondo-devices.c

    r1842 r1903  
    15761576    }
    15771577    if (bkpinfo->backup_media_type == tape && bkpinfo->restore_data) {
    1578         popup_and_OK(_("Please remove CD from drive"));
     1578        popup_and_OK(_("Please remove media from drive"));
    15791579    }
    15801580    mr_msg(3, "media type = %s",
     
    18041804
    18051805    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 */
    18061810        if (!bkpinfo->nfs_mount[0]) {
    18071811            strcpy(bkpinfo->nfs_mount,
     
    18401844            mr_free(command);
    18411845
    1842             mr_asprintf(&comment,
     1846            if (!bkpinfo->restore_data) {
     1847                mr_asprintf(&comment,
    18431848                    _("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;
    18471855            }
    18481856            mr_free(comment);
     
    18631871            }
    18641872        }
    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 {
    18661879            sprintf(bkpinfo->isodir, "%s/nfsdir", bkpinfo->tmpdir);
    18671880            mr_asprintf(&command, "mkdir -p %s", bkpinfo->isodir);
  • branches/stable/mondo/src/common/libmondo-filelist.c

    r1817 r1903  
    15271527    time_t time_of_last_full_backup = 0;
    15281528    struct stat statbuf;
     1529    char *tmp1 = NULL;
     1530    char *tmp2 = NULL;
    15291531
    15301532    malloc_string(sz_datefile);
     
    15861588        mr_msg(2, "include_paths = '%s'", include_paths);
    15871589        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);
    15911601
    15921602        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
    15931608        mr_msg(2,
    15941609                "Generating skeleton filelist so that we can track our progress");
  • branches/stable/mondo/src/common/libmondo-stream.c

    r1663 r1903  
    885885        return (1);
    886886    }
     887    /* Not used
    887888    mr_asprintf(&tmp, "Reading file from tape; writing to '%s'; %ld KB",
    888889             outfname, (long) size >> 10);
    889     log_to_screen(tmp);
    890     mr_free(tmp);
     890            */
    891891
    892892    if (foutstream) {
  • branches/stable/mondo/src/common/libmondo-tools.c

    r1842 r1903  
    901901
    902902    // 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)) {
    908904        log_to_screen(_("I think you have a Windows 9x partition."));
    909905        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 #endif
    917906    }
    918907
  • branches/stable/mondo/src/common/newt-specific.c

    r1770 r1903  
    259259    kill_anything_like_this(char *str) {
    260260
    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);
     261char *tmp = NULL;
     262char *tmp1 = NULL;
     263
     264    mr_asprintf(&tmp,"ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"", ps_options, str, ps_proc_id);
    264265    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    }
    265271    mr_free(tmp);
    266272}
Note: See TracChangeset for help on using the changeset viewer.