Skip to content

Commit

Permalink
Proxmox to detected distros
Browse files Browse the repository at this point in the history
  • Loading branch information
namiltd committed Sep 8, 2023
1 parent d114ded commit 6fe4639
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog of phpSysInfo

http://phpsysinfo.sourceforge.net/

phpSysInfo 3.4.4
----------------
- [ADD] Proxmox to detected distros

phpSysInfo 3.4.3
----------------
- [ADD] Linux Lite, BigLinux, Linspire, Tuxedo, Armbian, Photon, RebeccaBlackOS, QuemOS, dahliaOS, openEuler, Runtu, risiOS, Nobara, Fatdog, CachyOS, Snal, Feren, Archman, Elive, RoboLinux, ExTiX, Kaisen, LXLE, Neptune, Regata, Archcraft, Kodachi, Bodhi, Siduction, Vanilla, Q4OS, Guix, XeroLinux, OpenWRT, Gnoppix, Uruk, Laclin, Clear, Sparky and Venom Linux to detected distros
Expand Down
8 changes: 8 additions & 0 deletions data/distros.ini
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ Image = "RebeccaBlackOS.png"
;detected in "/etc/os-release"
;wrong in "/etc/debian_version" Debian

[proxmox]
Image = "Proxmox.png"
Name = "Proxmox"
Files = "/usr/bin/pveversion"
Mode = "execute"
;wrong in "/etc/os-release" Debian GNU/Linux
;wrong in "/etc/debian_version" Debian

[q4os]
Image = "Q4OS.png"
Name = "Q4OS"
Expand Down
Binary file added gfx/images/Proxmox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions includes/os/class.Linux.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,8 @@ protected function _distro()
} elseif (isset($distribution['Mode'])&&(strtolower($distribution['Mode'])=="execute")) {
if (!CommonFunctions::executeProgram($filename, '2>/dev/null', $buf, PSI_DEBUG)) {
$buf = "";
} elseif (preg_match('/^pve-manager\/([\d.]+)\//', $buf, $vers_buf)) { // Proxmox version
$buf = $vers_buf[1];
}
} else {
if (!CommonFunctions::rfts($filename, $buf, 1, 4096, false)) {
Expand Down
14 changes: 14 additions & 0 deletions sample/distrotest/Proxmox/8.0.3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
----------/etc/os-release----------
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
----------/etc/debian_version----------
12.0
----------/usr/bin/pveversion----------
pve-manager/8.0.3/bbf3993334bfa916 (running kernel: 6.2.16-3-pve)

0 comments on commit 6fe4639

Please sign in to comment.