1 package Ocsinventory::Agent::Backend::OS::Generic::Hostname;
4 eval { require (Sys::Hostname) };
7 return if ($? >> 8)!=0;
9 return if ($? >> 8)!=0;
13 # Initialise the distro entry
16 my $inventory = $params->{inventory};
20 # ico, Tue, 26 May 2009 17:58:27 +0200
21 chomp ( my $hostname = `hostname --fqdn` );
23 $inventory->setHardware ({NAME => $hostname});