Changeset 2222 in MondoRescue for branches/2.2.9/mondo/src


Ignore:
Timestamp:
Jun 17, 2009, 3:09:22 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Usage of partprobe at restore time if possible
  • fix call to fdisk into parted2fdisk
Location:
branches/2.2.9/mondo/src
Files:
2 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));
  • branches/2.2.9/mondo/src/mondorestore/mondo-prep.c

    r2211 r2222  
    16861686        if (!run_program_and_log_output(tmp, 5)) {
    16871687            g_partition_table_locked_up++;
     1688        }
     1689        sprintf(tmp, "partprobe %s", drivename);
     1690        if (!run_program_and_log_output(tmp, 5)) {
     1691            g_partition_table_locked_up--;
     1692        }
     1693        if (g_partition_table_locked_up > 0) {
    16881694            log_to_screen
    1689                 ("A flaw in the Linux kernel has locked the partition table.");
     1695                ("A flaw in the Linux kernel has locked the partition table. Even calling partprobe did not suceed :-(");
    16901696        }
    16911697    }
Note: See TracChangeset for help on using the changeset viewer.