Changeset 914 in MondoRescue for trunk/mondo/src/common/libmondo-tools.c


Ignore:
Timestamp:
Nov 2, 2006, 2:00:32 AM (17 years ago)
Author:
Bruno Cornec
Message:

merge -r902:913 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/common/libmondo-tools.c

    r900 r914  
    404404#else
    405405    tmp = call_program_and_get_last_line_of_output
    406              ("free | grep \":\" | tr -s ' ' '\t' | cut -f2 | head -n1");
     406             ("free | grep ':' | tr -s ' ' '\t' | cut -f2 | head -n1");
    407407    avm += atol(tmp);
    408408    mr_free(tmp);
     
    11101110    log_msg(4, "Setting command to something");
    11111111    mr_asprintf(&command,
    1112              "grep -v \":\" /etc/fstab | grep -vx \"#.*\" | grep -w \"/boot\" | tr -s ' ' '\t' | cut -f1 | head -n1");
     1112             "grep -v ':' /etc/fstab | grep -vE '^#.*$' | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
    11131113    log_msg(4, "Cool. Command = '%s'", command);
    11141114    tmp = call_program_and_get_last_line_of_output(command);
     
    11271127            }
    11281128        } else {
    1129             mr_asprintf(&command, "mount | grep -w \"%s\"", tmp);
     1129            mr_asprintf(&command, "mount | grep -E '^%s'", tmp);
    11301130            log_msg(3, "command = %s", command);
    11311131            if (run_program_and_log_output(command, 5)) {
     
    12151215             ("mktemp -q /tmp/mojo-jojo.blah.XXXXXX");
    12161216    if (does_file_exist(config_file)) {
    1217         mr_asprintf(&command, "grep -vx '%s .*' %s > %s",
     1217        mr_asprintf(&command, "grep -vE '^%s .*$' %s > %s",
    12181218                label, config_file, tempfile);
    12191219        paranoid_system(command);
Note: See TracChangeset for help on using the changeset viewer.