From 0717cc735f9aef8e157723bc6dd8c2e91c2a50df Mon Sep 17 00:00:00 2001 From: janw Date: Wed, 5 Mar 2008 06:31:00 +0000 Subject: [PATCH] assign hostname. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9329 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/siTriggered.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gosa-si/server/events/siTriggered.pm b/gosa-si/server/events/siTriggered.pm index c6728266c..578a96845 100644 --- a/gosa-si/server/events/siTriggered.pm +++ b/gosa-si/server/events/siTriggered.pm @@ -165,7 +165,7 @@ sub detected_hardware { $dnsname= $msg_hash->{'force-hostname'}[0]; &main::daemon_log("INFO: Using forced hostname $dnsname for client $address", 4); } else { - gethostbyaddr(inet_aton($ipaddress), AF_INET) || $ipaddress; + $dnsname= gethostbyaddr(inet_aton($ipaddress), AF_INET) || $ipaddress; } my $cn = (($dnsname =~ /^(\d){1,3}\.(\d){1,3}\.(\d){1,3}\.(\d){1,3}/) ? $dnsname : sprintf "%s", $dnsname =~ /([^\.]+)\.?/); -- 2.30.2