wok diff ocsinventory-agent/stuff/Slitaz.pm @ rev 23397
updated perl-test-mockmodule (0.170.0 -> 0.172.0)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 31 17:19:23 2020 +0100 (2020-03-31) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ocsinventory-agent/stuff/Slitaz.pm Tue Mar 31 17:19:23 2020 +0100 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;