Code

- Corrected open perl function, corrected variable passing to open and close
authoropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 28 Mar 2010 00:07:24 +0000 (00:07 +0000)
committeropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 28 Mar 2010 00:07:24 +0000 (00:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17330 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/siTriggered.pm

index 530da9292f03c13183057b39a190b805a7a7f803..3fcbdc328d9c744d2af0d639b4ebad096a0e6ab5 100644 (file)
@@ -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= <TFILE>;
-                       close(TFILE);
+                       open(my $TFILE, "<", "/var/tmp/$macaddress");
+                       $dnsname= <$TFILE>;
+                       close($TFILE);
                } else {
                        $dnsname= gethostbyaddr(inet_aton($ipaddress), AF_INET) || $ipaddress;
                }