mirror of
https://github.com/webmin/webmin.git
synced 2026-09-16 02:20:39 +01:00
ⓘ Add a read-only module that summarizes the system, mainboard, boot firmware, Secure Boot and TPM state, usable memory and processors, and inventories PCI, USB, storage, network and hardware-monitor devices with their bound kernel drivers and modules. All data is read directly from "sysfs" and "procfs" without external commands, with friendly device names loaded from the standard "pci.ids" and "usb.ids" databases when installed. https://forum.virtualmin.com/t/show-server-information/137862/
20 lines
341 B
Perl
20 lines
341 B
Perl
#!/usr/local/bin/perl
|
|
# Decide whether the Linux sysfs hardware inventory is available.
|
|
|
|
use strict;
|
|
use warnings;
|
|
use lib "..";
|
|
|
|
use WebminCore;
|
|
|
|
# is_installed(mode)
|
|
# Returns Webmin's install-check code when the sysfs device tree is present.
|
|
sub is_installed
|
|
{
|
|
return 0 if (!-d "/sys" || !-d "/sys/devices");
|
|
return $_[0] ? 2 : 1;
|
|
}
|
|
|
|
1;
|
|
|