X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Finstall%2Bsetup%2Finstall%2Fhw.c;fp=src%2Finstall%2Bsetup%2Finstall%2Fhw.c;h=1863dfc90fac5d944c1d7fc8788b5b1a0e270d3b;hp=c86e006fb24324aa7876dafb41fa93078bec5e08;hb=268090a8914aea182dcd3b435d88598813947950;hpb=fde373873bec1bea5cb5ac1c54d47cf75802dbf0 diff --git a/src/install+setup/install/hw.c b/src/install+setup/install/hw.c index c86e006fb2..1863dfc90f 100644 --- a/src/install+setup/install/hw.c +++ b/src/install+setup/install/hw.c @@ -503,6 +503,30 @@ int hw_create_partitions(struct hw_destination* dest) { int r = mysystem(cmd); + // Wait until the system re-read the partition table + if (r == 0) { + unsigned int counter = 10; + + while (counter-- > 0) { + sleep(1); + + if (*dest->part_boot && (access(dest->part_boot, R_OK) != 0)) + continue; + + if (*dest->part_swap && (access(dest->part_swap, R_OK) != 0)) + continue; + + if (*dest->part_root && (access(dest->part_root, R_OK) != 0)) + continue; + + if (*dest->part_data && (access(dest->part_data, R_OK) != 0)) + continue; + + // All partitions do exist, exiting the loop. + break; + } + } + if (cmd) free(cmd);