source: ocsinventory-agent/trunk/fuentes/lib/Ocsinventory/Agent/Backend/OS/AIX.pm @ 468

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

Copyt trusty code

File size: 791 bytes
Line 
1package Ocsinventory::Agent::Backend::OS::AIX;
2
3use strict;
4use vars qw($runAfter);
5$runAfter = ["Ocsinventory::Agent::Backend::OS::Generic"];
6
7sub check {
8        my $r;
9        $r = 1 if $^O =~ /^aix$/;
10        $r;
11}
12
13sub run {
14  my $params = shift;
15  my $common = $params->{common};
16 
17  my @tabOS;
18  my $OSName;
19  my $OSComment;
20  my $OSVersion;
21  my $OSLevel;
22  #Operating system informations
23  chomp($OSName=`uname -s`);
24  # AIX OSVersion = oslevel, OSComment=oslevel -r affiche niveau de maintenance
25  chomp($OSVersion=`oslevel`);
26  chomp($OSLevel=`oslevel -r`);
27  @tabOS=split(/-/,$OSLevel);
28  $OSComment="Maintenance Level :".@tabOS[1];
29
30  $OSVersion =~ s/(.0)*$//;
31  $common->setHardware({
32      OSNAME => "$OSName $OSVersion",
33      OSCOMMENTS => $OSComment,
34      OSVERSION => $OSLevel,
35    });
36}
371;
Note: See TracBrowser for help on using the repository browser.