mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
added support for lshw binary in plugins folder
This commit is contained in:
parent
877de80920
commit
6e6ccb0bc1
@ -460,15 +460,19 @@ close (FILE);
|
||||
$Mode = 'LSHW';
|
||||
$Separator = '\s+\*\-';
|
||||
my @hwinfo;
|
||||
my $lshwpath = $0 =~ s/inventory/lshw/r ;
|
||||
if (is_enabled $AIX) {
|
||||
$Separator = '^\s*$';
|
||||
@hwinfo=`prtconf 2>/dev/null`;
|
||||
} else {
|
||||
@hwinfo = `lshw 2>/dev/null`;
|
||||
if ($? != 0) {
|
||||
$Mode = 'HWINFO';
|
||||
$Separator = 'Hardware Class:';
|
||||
@hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
|
||||
@hwinfo = `$lshwpath 2>/dev/null`;
|
||||
if ($? != 0) {
|
||||
$Mode = 'HWINFO';
|
||||
$Separator = 'Hardware Class:';
|
||||
@hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user