mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:24:58 +02:00
OS (Linux): adds support for proxmox backup server detection (#2443)
* add support for proxmox backup server detection * Update Proxmox identifiers and pretty names * Simplify Proxmox logo names in p.inc --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
This commit is contained in:
@@ -208,7 +208,7 @@ FF_A_UNUSED static bool detectDebianDerived(FFOSResult* result) {
|
||||
ffStrbufSetStatic(&result->idLike, "debian");
|
||||
return true;
|
||||
} else if (access("/usr/bin/pveversion", X_OK) == 0) {
|
||||
ffStrbufSetStatic(&result->id, "pve");
|
||||
ffStrbufSetStatic(&result->id, "proxmox");
|
||||
ffStrbufSetStatic(&result->idLike, "debian");
|
||||
ffStrbufSetStatic(&result->name, "Proxmox VE");
|
||||
ffStrbufClear(&result->versionID);
|
||||
@@ -220,8 +220,30 @@ FF_A_UNUSED static bool detectDebianDerived(FFOSResult* result) {
|
||||
NULL,
|
||||
}) == NULL) { // 8.2.2
|
||||
ffStrbufTrimRightSpace(&result->versionID);
|
||||
ffStrbufSetStatic(&result->prettyName, "Proxmox VE ");
|
||||
ffStrbufAppend(&result->prettyName, &result->versionID);
|
||||
} else {
|
||||
ffStrbufSetStatic(&result->prettyName, "Proxmox VE");
|
||||
}
|
||||
return true;
|
||||
} else if (access("/usr/sbin/proxmox-backup-manager", X_OK) == 0) {
|
||||
ffStrbufSetStatic(&result->id, "proxmox");
|
||||
ffStrbufSetStatic(&result->idLike, "debian");
|
||||
ffStrbufSetStatic(&result->name, "Proxmox Backup Server");
|
||||
ffStrbufClear(&result->versionID);
|
||||
if (ffProcessAppendStdOut(&result->versionID, (char* const[]) {
|
||||
"/usr/bin/dpkg-query",
|
||||
"--showformat=${version}",
|
||||
"--show",
|
||||
"proxmox-backup-server",
|
||||
NULL,
|
||||
}) == NULL) {
|
||||
ffStrbufTrimRightSpace(&result->versionID);
|
||||
ffStrbufSetStatic(&result->prettyName, "Proxmox Backup Server ");
|
||||
ffStrbufAppend(&result->prettyName, &result->versionID);
|
||||
} else {
|
||||
ffStrbufSetStatic(&result->prettyName, "Proxmox Backup Server");
|
||||
}
|
||||
ffStrbufSetF(&result->prettyName, "Proxmox VE %s", result->versionID.chars);
|
||||
return true;
|
||||
} else if (ffPathExists("/etc/rpi-issue", FF_PATHTYPE_FILE)) {
|
||||
// Raspberry Pi OS
|
||||
|
||||
@@ -311,7 +311,7 @@ static const FFlogo P[] = {
|
||||
#ifdef FASTFETCH_DATATEXT_LOGO_PROXMOX
|
||||
// Proxmox
|
||||
{
|
||||
.names = { "Proxmox", "pve" },
|
||||
.names = { "Proxmox" },
|
||||
.lines = FASTFETCH_DATATEXT_LOGO_PROXMOX,
|
||||
.colors = {
|
||||
FF_COLOR_FG_WHITE,
|
||||
|
||||
Reference in New Issue
Block a user