Changeset 910


Ignore:
Timestamp:
Nov 1, 2006, 6:22:57 PM (11 years ago)
Author:
bruno
Message:

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

Location:
branches/stable/mondo/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/mondoarchive/mondo-cli.c

    r809 r910  
    637637            strncpy(bkpinfo->nfs_remote_dir, "/", MAX_STR_LEN);
    638638        }
    639         sprintf(tmp, "mount | grep -x \"%s .*\" | cut -d' ' -f3",
     639        sprintf(tmp, "mount | grep -E \"^%s .*\" | cut -d' ' -f3",
    640640                bkpinfo->nfs_mount);
    641641        strncpy(bkpinfo->isodir,
  • 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);
  • branches/stable/mondo/src/restore-scripts/mondo/compare-me

    r567 r910  
    261261fi
    262262
    263 grep -v -x "Files [^:]*:-" /tmp/compare-me.log \
     263grep -v -E '^Files [^:]*:-$' /tmp/compare-me.log \
    264264| sort -u > /tmp/suspect.files
    265265
Note: See TracChangeset for help on using the changeset viewer.