mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +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';
|
$Mode = 'LSHW';
|
||||||
$Separator = '\s+\*\-';
|
$Separator = '\s+\*\-';
|
||||||
my @hwinfo;
|
my @hwinfo;
|
||||||
|
my $lshwpath = $0 =~ s/inventory/lshw/r ;
|
||||||
if (is_enabled $AIX) {
|
if (is_enabled $AIX) {
|
||||||
$Separator = '^\s*$';
|
$Separator = '^\s*$';
|
||||||
@hwinfo=`prtconf 2>/dev/null`;
|
@hwinfo=`prtconf 2>/dev/null`;
|
||||||
} else {
|
} else {
|
||||||
@hwinfo = `lshw 2>/dev/null`;
|
@hwinfo = `lshw 2>/dev/null`;
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
$Mode = 'HWINFO';
|
@hwinfo = `$lshwpath 2>/dev/null`;
|
||||||
$Separator = 'Hardware Class:';
|
if ($? != 0) {
|
||||||
@hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
|
$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