wok-current annotate 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 |
rev | line source |
---|---|
erjo@3675 | 1 package Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Slitaz; |
erjo@3675 | 2 use strict; |
erjo@3675 | 3 |
erjo@3675 | 4 sub check {-f "/etc/slitaz-release"} |
erjo@3675 | 5 |
erjo@3675 | 6 ##### |
erjo@3675 | 7 sub findRelease { |
erjo@3675 | 8 my $v; |
erjo@3675 | 9 |
erjo@3675 | 10 open V, "</etc/slitaz-release" or warn; |
erjo@3675 | 11 chomp ($v=<V>); |
erjo@3675 | 12 close V; |
erjo@3675 | 13 return "SliTaz GNU/Linux $v"; |
erjo@3675 | 14 } |
erjo@3675 | 15 |
erjo@3675 | 16 sub run { |
erjo@3675 | 17 my $params = shift; |
erjo@3675 | 18 my $inventory = $params->{inventory}; |
erjo@3675 | 19 |
erjo@3675 | 20 my $OSComment; |
erjo@3675 | 21 chomp($OSComment =`uname -v`); |
erjo@3675 | 22 |
erjo@3675 | 23 $inventory->setHardware({ |
erjo@3675 | 24 OSNAME => findRelease(), |
erjo@3675 | 25 OSCOMMENTS => "$OSComment" |
erjo@3675 | 26 }); |
erjo@3675 | 27 } |
erjo@3675 | 28 |
erjo@3675 | 29 1; |