Ignore:
Timestamp:
Jan 27, 2011, 7:31:24 PM (13 years ago)
Author:
Bruno Cornec
Message:

r4180@localhost: bruno | 2011-01-27 10:26:41 +0100

  • Fix multiple port issues from 2.2.9 that prevented mindi to work
  • Change interface of call_program_and_get_last_line_of_output to allow not logging (call to mindi)
  • Status is working boot, but NFS interface broken due to conf file issues
File:
1 edited

Legend:

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

    r2696 r2704  
    225225    d = 5.2;                    // :-)
    226226#else
    227     tmp = call_program_and_get_last_line_of_output("uname -r");
     227    tmp = call_program_and_get_last_line_of_output("uname -r",TRUE);
    228228    p = strchr(tmp, '.');
    229229    if (p) {
     
    476476        if (getenv ("SUDO_COMMAND")) {
    477477            mr_asprintf(command, "strings `which growisofs` | grep -c SUDO_COMMAND");
    478             tmp = call_program_and_get_last_line_of_output(command);
     478            tmp = call_program_and_get_last_line_of_output(command,TRUE);
    479479            if (!strcmp(tmp, "1")) {
    480480                mr_free(command);
     
    575575        mr_asprintf(command, "df -P %s | tail -n1 | cut -d' ' -f1", bkpinfo->isodir);
    576576        log_it("command = %s", command);
    577         iso_dev = call_program_and_get_last_line_of_output(command);
     577        iso_dev = call_program_and_get_last_line_of_output(command,TRUE);
    578578        log_it("res of it = %s", iso_dev);
    579579        mr_free(command);
     
    583583
    584584        log_it("command = %s", command);
    585         iso_mnt = call_program_and_get_last_line_of_output(command);
     585        iso_mnt = call_program_and_get_last_line_of_output(command,TRUE);
    586586        log_it("res of it = %s", iso_mnt);
    587587        mr_free(command);
     
    858858
    859859    mr_asprintf(command, "df -m -P %s | tail -n1 | tr -s ' ' '\t' | cut -f4", partition);
    860     out_sz = call_program_and_get_last_line_of_output(command);
     860    out_sz = call_program_and_get_last_line_of_output(command,TRUE);
    861861    mr_free(command);
    862862
     
    900900        run_program_and_log_output("ln -sf `which mkfs.msdos` /sbin/mkfs.vfat", FALSE);
    901901    }
    902     tmp = call_program_and_get_last_line_of_output("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2");
     902    tmp = call_program_and_get_last_line_of_output("free | grep Mem | head -n1 | tr -s ' ' '\t' | cut -f2",TRUE);
    903903    if (atol(tmp) < 35000) {
    904904        retval++;
     
    961961
    962962    run_program_and_log_output("umount `mount | grep cdr | cut -d' ' -f3 | tr '\n' ' '`", 5);
    963     tmp = call_program_and_get_last_line_of_output("mount | grep -E \"cdr(om|w)\"");
     963    tmp = call_program_and_get_last_line_of_output("mount | grep -E \"cdr(om|w)\"",TRUE);
    964964    if (strcmp("", tmp)) {
    965965        if (strstr(tmp, "autofs")) {
     
    10461046    } else {
    10471047        mr_asprintf(command, "grep '%s .*' %s| cut -d' ' -f2,3,4,5", label, config_file);
    1048         value = call_program_and_get_last_line_of_output(command);
     1048        value = call_program_and_get_last_line_of_output(command,TRUE);
    10491049        mr_free(command);
    10501050
     
    11751175    mr_asprintf(command, "%s", "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
    11761176    log_msg(4, "Cool. Command = '%s'", command);
    1177     tmp = call_program_and_get_last_line_of_output(command);
     1177    tmp = call_program_and_get_last_line_of_output(command,TRUE);
    11781178    mr_free(command);
    11791179
     
    11821182    mr_asprintf(command, "mount | grep -Ew '/boot'");
    11831183    mr_free(tmp);
    1184     tmp = call_program_and_get_last_line_of_output(command);
     1184    tmp = call_program_and_get_last_line_of_output(command,TRUE);
    11851185    mr_free(command);
    11861186
     
    13811381    char *tmp = NULL;
    13821382
    1383     tmp = call_program_and_get_last_line_of_output("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99");
     1383    tmp = call_program_and_get_last_line_of_output("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99",TRUE);
    13841384
    13851385    strcpy(g_magicdev_command, tmp);
Note: See TracChangeset for help on using the changeset viewer.