From 3b6a7d5edd92bf233182a8fbab83f10760cd53b8 Mon Sep 17 00:00:00 2001 From: opensides Date: Sun, 28 Mar 2010 00:07:24 +0000 Subject: [PATCH] - Corrected open perl function, corrected variable passing to open and close git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17330 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/siTriggered.pm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gosa-si/server/events/siTriggered.pm b/gosa-si/server/events/siTriggered.pm index 530da9292..3fcbdc328 100644 --- a/gosa-si/server/events/siTriggered.pm +++ b/gosa-si/server/events/siTriggered.pm @@ -1,23 +1,23 @@ package siTriggered; + +use strict; +use warnings; + use Exporter; +use Data::Dumper; +use GOSA::GosaSupportDaemon; +use Socket; + @ISA = qw(Exporter); my @events = ( "got_ping", "detected_hardware", "trigger_wake", "reload_ldap_config", - "get_terminal_server", + "get_terminal_server", ); @EXPORT = @events; -use strict; -use warnings; -use Data::Dumper; -use GOSA::GosaSupportDaemon; -use Socket; - - - BEGIN {} END {} @@ -225,9 +225,9 @@ sub detected_hardware { # $dnsname= $heap->{force-hostname}->{$macaddress}; # &main::daemon_log("INFO: Using forced hostname $dnsname for client $address", 4); if (-e "/var/tmp/$macaddress" ){ - open(TFILE, "< /var/tmp/$macaddress"); - $dnsname= ; - close(TFILE); + open(my $TFILE, "<", "/var/tmp/$macaddress"); + $dnsname= <$TFILE>; + close($TFILE); } else { $dnsname= gethostbyaddr(inet_aton($ipaddress), AF_INET) || $ipaddress; } -- 2.30.2