wok-current diff ocsinventory-agent/stuff/Slitaz.pm @ rev 25368
libmpd: typo
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 29 10:44:25 2022 +0000 (2022-07-29) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ocsinventory-agent/stuff/Slitaz.pm Fri Jul 29 10:44:25 2022 +0000 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;