Ignore:
Timestamp:
Nov 1, 2006, 6:22:57 PM (17 years ago)
Author:
Bruno Cornec
Message:

replaces grep -x by grep -E during restore as busybox doesn't provide -x either

File:
1 edited

Legend:

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

    r909 r910  
    400400            f, file);
    401401    log_msg(2, tmp);
    402     sprintf(command, "grep -x \"%s\" %s", file, list_fname);
     402    sprintf(command, "grep -E '^%s$' %s", file, list_fname);
    403403    res = run_program_and_log_output(command, FALSE);
    404404    paranoid_free(command);
     
    13991399            paranoid_system(command);
    14001400        }
    1401         sprintf(command, "grep  -x \"/dev/.*\" %s > %s",
     1401        sprintf(command, "grep -E '^/dev/.*' %s > %s",
    14021402                g_biggielist_txt, g_filelist_imagedevs);
    14031403        paranoid_system(command);
     
    15401540        res = run_program_and_log_output(tmp, FALSE);
    15411541    } else {
    1542         sprintf(tmp, "ls /dev | grep -xq %ss[1-4].*", device);
     1542        sprintf(tmp, "ls /dev | grep -Eq '^%ss[1-4].*'", device);
    15431543        if (!system(tmp)) {
    15441544            sprintf(tmp, MNT_RESTORING "/sbin/fdisk -B %s", device);
Note: See TracChangeset for help on using the changeset viewer.