Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
share
/
fusioninventory
/
lib
/
FusionInventory
/
Agent
/
Task
/
Inventory
/
Linux
/
PowerPC
Upload
4 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
Bios.pm
1.19 KB
-rw-r--r--
2020-08-04 07:36:42
Edit
Del
CPU.pm
1.22 KB
-rw-r--r--
2020-08-04 07:36:42
Edit
Del
Editing: Bios.pm
(1.19 KB)
Path: /usr/share/fusioninventory/lib/FusionInventory/Agent/Task/Inventory/Linux/PowerPC/Bios.pm
Back
package FusionInventory::Agent::Task::Inventory::Linux::PowerPC::Bios; use strict; use warnings; use parent 'FusionInventory::Agent::Task::Inventory::Module'; use FusionInventory::Agent::Tools; sub isEnabled { return 1; } sub doInventory { my (%params) = @_; my $inventory = $params{inventory}; my $bios; $bios->{SSN} = getFirstLine(file => '/proc/device-tree/serial-number'); $bios->{SSN} =~ s/[^\,^\.^\w^\ ]//g; # I remove some unprintable char $bios->{SMODEL} = getFirstLine(file => '/proc/device-tree/model'); $bios->{SMODEL} =~ s/[^\,^\.^\w^\ ]//g; my $colorCode = getFirstLine(file => '/proc/device-tree/color-code'); my ($color) = unpack "h7" , $colorCode; $bios->{SMODEL} .= " color: $color" if $color; $bios->{BVERSION} = getFirstLine(file => '/proc/device-tree/openprom/model'); $bios->{BVERSION} =~ s/[^\,^\.^\w^\ ]//g; my $copyright = getFirstLine(file => '/proc/device-tree/copyright'); if ($copyright && $copyright =~ /Apple/) { # What about the Apple clone? $bios->{BMANUFACTURER} = "Apple Computer, Inc."; $bios->{SMANUFACTURER} = "Apple Computer, Inc."; } $inventory->setBios($bios); } 1;