source: ocsinventory-agent/trunk/fuentes/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB/Gentoo.pm @ 468

Last change on this file since 468 was 468, checked in by mabarracus, 4 years ago

Copyt trusty code

File size: 482 bytes
Line 
1package Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Gentoo;
2use strict;
3
4sub check {-f "/etc/gentoo-release"}
5
6#####
7sub findRelease {
8  my $v;
9
10  open V, "</etc/gentoo-release" or warn;
11  chomp ($v=<V>);
12  close V;
13  return "Gentoo Linux $v";
14}
15
16sub run {
17  my $params = shift;
18  my $common = $params->{common};
19
20  my $OSComment;
21  chomp($OSComment =`uname -v`);
22
23  $common->setHardware({ 
24      OSNAME => findRelease(),
25      OSCOMMENTS => "$OSComment"
26    });
27}
28
291;
Note: See TracBrowser for help on using the repository browser.