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

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

Copyt trusty code

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