Skip to content

Commit

Permalink
fqdn fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Pisarev committed Nov 21, 2023
1 parent 599cf3c commit 80b7b4a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/GLPI/Agent/Tools/Hostname.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ sub getHostname {

sub _getHostnameUnix {

Sys::Hostname->require();
return Sys::Hostname::hostname();
Net::Domain->require();
my $fqdn = Net::Domain::hostfqdn();
$fqdn =~ s/\.$//;

return $fqdn;
}

sub _getHostnameWindows {
Expand Down

0 comments on commit 80b7b4a

Please sign in to comment.