Skip to content

Commit

Permalink
Don't try to fix via sgdisk if it is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
uroni committed Nov 2, 2024
1 parent 8226431 commit e388ab4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions urbackupclient/client_restore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e388ab4

Please sign in to comment.