Ignore:
Timestamp:
Jun 17, 2009, 3:09:22 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • Usage of partprobe at restore time if possible
  • fix call to fdisk into parted2fdisk
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-cli.c

    r2214 r2222  
    393393    ********/
    394394    mr_asprintf(&command,
    395       "fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
     395      "parted2fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
    396396    log_msg(4, "Executing: %s", command);
    397397    mr_asprintf(&partition_list, "%s", call_program_and_get_last_line_of_output(command));
     
    446446        /* See if it's swap. If it is, ignore it. */
    447447        mr_asprintf(&command,
    448           "fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'",
     448          "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'",
    449449          dsf, partitions[i]);
    450450        log_msg(4, "  Running: %s", command);
     
    477477        log_msg(4, "  It's not mounted. Checking to see if it's LVM...");
    478478        /* Get the partition ID; 8e for LVM */
    479         mr_asprintf(&command, "fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", dsf, partitions[i]);
     479        mr_asprintf(&command, "parted2fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", dsf, partitions[i]);
    480480        log_msg(4, "  Running: %s", command);
    481481        mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
Note: See TracChangeset for help on using the changeset viewer.