From: cajus Date: Wed, 5 Mar 2008 16:36:59 +0000 (+0000) Subject: Fixed problem with hostnames X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8a602762621256c156007524eb7348dea4ba7243;p=gosa.git Fixed problem with hostnames git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9370 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/siTriggered.pm b/gosa-si/server/events/siTriggered.pm index 798dcb1de..9638cca17 100644 --- a/gosa-si/server/events/siTriggered.pm +++ b/gosa-si/server/events/siTriggered.pm @@ -13,7 +13,6 @@ use strict; use warnings; use GOSA::GosaSupportDaemon; use Socket; -use Net::hostent; BEGIN {} @@ -256,20 +255,9 @@ sub trigger_wake { # get the hardware address (ethernet address) $hwaddr_re = join(':', ('[0-9A-Fa-f]{1,2}') x 6); if ($host =~ m/^$hwaddr_re$/) { - $hwaddr = $host; + $hwaddr = $host; } else { - # $host is not a hardware address, try to resolve it - my $ip_re = join('\.', ('([0-9]|[1-9][0-9]|1[0-9]{2}|2([0-4][0-9]|5[0-5]))') x 4); - my $ip_addr; - if ($host =~ m/^$ip_re$/) { - $ip_addr = $host; - } else { - my $h; - unless ($h = gethost($host)) { - return undef; - } - $ip_addr = inet_ntoa($h->addr); - } + &main::daemon_log("ERROR: trigger_wake called with non mac address", 1); } # Generate magic sequence