Don't try to fix via sgdisk if it is not available

This commit is contained in:
Martin 2024-11-02 16:49:10 +01:00
parent 8226431df6
commit e388ab4306

View File

@ -1266,6 +1266,17 @@ namespace restore
}
}
if (curr_fix_gpt && fix_gpt)
{
std::string out;
int rc = os_popen("sgdisk --version", out);
if (rc != 0 || out.find("sgdisk") == std::string::npos)
{
Server->Log("sgdisk not available. Not able to fixup GPT table", LL_WARNING);
fix_gpt = false;
}
}
if(curr_fix_gpt && fix_gpt)
{
std::string fix_output;