polishing
This commit is contained in:
parent
ded3995169
commit
52216043bb
1 changed files with 2 additions and 5 deletions
|
|
@ -408,16 +408,13 @@ ErrorCode ServerController::installDockerWorker(const ServerCredentials &credent
|
||||||
|
|
||||||
qDebug().noquote() << "ServerController::installDockerWorker" << stdOut;
|
qDebug().noquote() << "ServerController::installDockerWorker" << stdOut;
|
||||||
if (container == DockerContainer::Awg) {
|
if (container == DockerContainer::Awg) {
|
||||||
QRegularExpression regex(R"(Linux\s+(\d+)\.(\d+))");
|
QRegularExpression regex(R"(Linux\s+(\d+)\.(\d+)[^\d]*)");
|
||||||
QRegularExpressionMatch match = regex.match(stdOut);
|
QRegularExpressionMatch match = regex.match(stdOut);
|
||||||
if (match.hasMatch()) {
|
if (match.hasMatch()) {
|
||||||
int major = match.captured(1).toInt();
|
int major = match.captured(1).toInt();
|
||||||
int minor = match.captured(2).toInt();
|
int minor = match.captured(2).toInt();
|
||||||
|
|
||||||
if (major > 4 || (major == 4 && minor >= 0)) {
|
if (major < 4 || (major == 4 && minor <= 1)) {
|
||||||
qDebug() << "Linux version is acceptable:" << major << "." << minor;
|
|
||||||
} else {
|
|
||||||
qDebug() << "Linux version is too low:" << major << "." << minor;
|
|
||||||
return ErrorCode::ServerLinuxKernelTooOld;
|
return ErrorCode::ServerLinuxKernelTooOld;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue