From 2f79c39f6241f47fdff4afc081c1f42907f5688a Mon Sep 17 00:00:00 2001 From: Marvin Hinz <35603466+marvinhinz@users.noreply.github.com> Date: Thu, 9 Jul 2026 13:05:22 +0200 Subject: [PATCH] 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 --- src/detection/os/os_linux.c | 26 ++++++++++++++++++++++++-- src/logo/ascii/p.inc | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/detection/os/os_linux.c b/src/detection/os/os_linux.c index 9e1fcef37..0c5d26362 100644 --- a/src/detection/os/os_linux.c +++ b/src/detection/os/os_linux.c @@ -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 diff --git a/src/logo/ascii/p.inc b/src/logo/ascii/p.inc index 38611147c..2cdbff886 100644 --- a/src/logo/ascii/p.inc +++ b/src/logo/ascii/p.inc @@ -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,