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

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

Copyt trusty code

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