wok-6.x diff ocsinventory-agent/stuff/Slitaz.pm @ rev 5390
Up: gtk+ (2.19.7)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 01 23:37:46 2010 +0200 (2010-05-01) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ocsinventory-agent/stuff/Slitaz.pm Sat May 01 23:37:46 2010 +0200 1.3 @@ -0,0 +1,29 @@ 1.4 +package Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Slitaz; 1.5 +use strict; 1.6 + 1.7 +sub check {-f "/etc/slitaz-release"} 1.8 + 1.9 +##### 1.10 +sub findRelease { 1.11 + my $v; 1.12 + 1.13 + open V, "</etc/slitaz-release" or warn; 1.14 + chomp ($v=<V>); 1.15 + close V; 1.16 + return "SliTaz GNU/Linux $v"; 1.17 +} 1.18 + 1.19 +sub run { 1.20 + my $params = shift; 1.21 + my $inventory = $params->{inventory}; 1.22 + 1.23 + my $OSComment; 1.24 + chomp($OSComment =`uname -v`); 1.25 + 1.26 + $inventory->setHardware({ 1.27 + OSNAME => findRelease(), 1.28 + OSCOMMENTS => "$OSComment" 1.29 + }); 1.30 +} 1.31 + 1.32 +1;