fix: TrueNAS SCALE version determination.

This commit is contained in:
Roelof Jansen 2025-07-28 10:12:58 +02:00
parent 55c36d62ff
commit 6c7a26b8be
2 changed files with 5 additions and 14 deletions

View File

@ -127,15 +127,8 @@ class Api {
const systemVersion = await this.getSystemVersion(); const systemVersion = await this.getSystemVersion();
const major = await this.getSystemVersionMajor(); const major = await this.getSystemVersionMajor();
// starting with version 25 the version string no longer contains `-SCALE` // the first SCALE version was Angelfish ALPHA
if ( return (systemVersion.v2 && Number(major) >= 20);
systemVersion.v2 &&
(systemVersion.v2.toLowerCase().includes("scale") || Number(major) >= 20)
) {
return true;
}
return false;
} }
async getSystemVersionMajorMinor() { async getSystemVersionMajorMinor() {

View File

@ -2178,12 +2178,10 @@ class FreeNASSshDriver extends ControllerZfsBaseDriver {
async getIsScale() { async getIsScale() {
const systemVersion = await this.getSystemVersion(); const systemVersion = await this.getSystemVersion();
const major = await this.getSystemVersionMajor();
if (systemVersion.v2 && systemVersion.v2.toLowerCase().includes("scale")) { // the first SCALE version was Angelfish ALPHA
return true; return (systemVersion.v2 && Number(major) >= 20);
}
return false;
} }
async getSystemVersionMajorMinor() { async getSystemVersionMajorMinor() {