Changeset 1854 in MondoRescue for branches


Ignore:
Timestamp:
Jan 11, 2008, 10:58:11 AM (16 years ago)
Author:
Bruno Cornec
Message:

removal of locate usage completely from code to use findw!

Location:
branches/2.2.5
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/mindi

    r1851 r1854  
    592592    done
    593593    if [ ! -e "$mappath" ] || [ -d "$mappath" ] ; then
    594        mappath=$(locate */kbd/keymaps/*/$locale)
     594            mappath=$(find / -name "*/kbd/keymaps/*/$locale")
    595595    fi
    596596    echo "mappath = $mappath" >> $LOGFILE
     
    617617    [ ! -e "$ISOLINUX" ] && ISOLINUX=/usr/share/lib/syslinux/isolinux.bin
    618618    [ ! -e "$ISOLINUX" ] && ISOLINUX=/usr/share/lib64/syslinux/isolinux.bin
    619     [ ! -e "$ISOLINUX" ] && ISOLINUX=`locate isolinux.bin | grep -x "/.*/isolinux.bin"`
     619    [ ! -e "$ISOLINUX" ] && ISOLINUX=`find / -name isolinux.bin | grep -x "/.*/isolinux.bin"`
    620620    [ ! -e "$ISOLINUX" ] && Die "Please install isolinux first. If your syslinux RPM doesn't include isolinux, you may download an isolinux RPM from Mondo's website - go to http://www.mondorescue.com and click on 'Download'"
    621621    echo "Found isolinux.bin at $ISOLINUX" >> $LOGFILE
  • branches/2.2.5/mondo/src/common/libmondo-archive.c

    r1848 r1854  
    20052005        paranoid_system(tmp3);
    20062006    }
    2007     /*
    2008        if (!does_file_exist(tmp))
    2009        {
    2010        log_msg (2, "Silly bug in Mindi.pl; workaround in progress...");
    2011        strcpy(fnam, call_program_and_get_last_line_of_output("locate isolinux.bin | tail -n1"));
    2012        if (strlen(fnam)>0 && does_file_exist(fnam))
    2013        {
    2014        sprintf(tmp, "cp -f %s %s", fnam, bkpinfo->scratchdir);
    2015        res = run_program_and_log_output(tmp, FALSE);
    2016        }
    2017        else
    2018        {
    2019        res = 1;
    2020        }
    2021        if (res)
    2022        {
    2023        log_msg (2, "Could not work around silly bug in Mindi.pl - sorry! Isolinux.bin missing");
    2024        }
    2025        }
    2026      */
    20272007    free(tmp2);
    20282008    free(tmp3);
  • branches/2.2.5/mondo/src/common/libmondo-filelist.c

    r1749 r1854  
    16961696    time_t time_of_last_full_backup = 0;
    16971697    struct stat statbuf;
     1698    char *tmp1 = NULL;
    16981699
    16991700    malloc_string(command);
     
    17511752        log_msg(2, "include_paths = '%s'", include_paths);
    17521753        log_msg(1, "Calculating filelist");
     1754        asprintf(&tmp1, "find %s -name '/win386.swp' -o -name '/hiberfil.sys' -o -name '/pagefile.sys' 2> /dev/null\n",call_program_and_get_last_line_of_output("mount |  grep -Ew 'ntfs|fat|vfat' | awk '{print $3}' | tr '\n' ' '"));
    17531755        snprintf(exclude_paths, (size_t)8*MAX_STR_LEN," %s %s %s %s %s %s %s . .. \
    17541756" MNT_CDROM " " MNT_FLOPPY " /media \
    1755 /proc /sys /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);
     1757/proc /sys /root/images/mondo " MINDI_CACHE, MONDO_CACHE, excp, call_program_and_get_last_line_of_output(tmp1), (tmpdir[0] == '/' && tmpdir[1] == '/') ? (tmpdir + 1) : tmpdir, (scratchdir[0] == '/' && scratchdir[1] == '/') ? (scratchdir + 1) : scratchdir);
     1758        paranoid_free(tmp1);
    17561759
    17571760        log_msg(2, "Excluding paths = '%s'", exclude_paths);
  • branches/2.2.5/mondo/src/common/libmondo-tools.c

    r1818 r1854  
    11721172        log_to_screen("I think you have a Windows 9x partition.");
    11731173        retval += whine_if_not_found("parted");
    1174 #ifndef __IA64__
    1175         /* IA64 always has one vfat partition for EFI even without Windows */
    1176         // retval +=
    1177         if (!find_home_of_exe("ms-sys")) {
    1178             log_to_screen("Please install ms-sys just in case.");
    1179         }
    1180 #endif
    11811174    }
    11821175
Note: See TracChangeset for help on using the changeset viewer.