1 package Ocsinventory::Agent::Backend::OS::Generic::Hostname;
4 return 1 if can_load ("Sys::Hostname::Long");
5 return 1 if can_run ("hostname");
9 # Initialise the distro entry
12 my $common = $params->{common};
16 if (can_load("Sys::Hostname::Long")) {
17 $hostname = Sys::Hostname::Long::hostname_long();
19 chomp ( $hostname = `hostname --fqdn` ); # TODO: This is not generic.
22 $common->setHardware ({NAME => $hostname});