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…
Reference in New Issue