Code

Fixed dialog ignore account state
[gosa.git] / gosa-si / modules / GosaSupportDaemon.pm
index 14e755aea245aefbb33d4f8df7d8f3dd6ca2c6a2..9c33df325d1a937c45dfc85392be2cbcda85349a 100644 (file)
@@ -15,7 +15,7 @@ use Net::DNS;
 use Net::ARP;
 use DateTime;
 
-@ISA = qw(Exporter);
+our @ISA = qw(Exporter);
 
 my @functions = (
     "create_passwd",
@@ -53,8 +53,9 @@ my @functions = (
     "check_opsi_res",
     "calc_timestamp",
     "opsi_callobj2string",
-    ); 
-@EXPORT = @functions;
+    );
+    
+our @EXPORT = @functions;
 
 my $op_hash = {
     'eq' => '=',
@@ -513,7 +514,7 @@ sub get_orderby_statement {
 sub get_dns_domains() {
         my $line;
         my @searches;
-        open($RESOLV, "<", "/etc/resolv.conf") or return @searches;
+        open(my $RESOLV, "<", "/etc/resolv.conf") or return @searches;
         while(<$RESOLV>){
                 $line= $_;
                 chomp $line;
@@ -726,7 +727,7 @@ sub get_interfaces {
        my @result;
        my $PROC_NET_DEV= ('/proc/net/dev');
 
-       open($FD_PROC_NET_DEV, "<", "$PROC_NET_DEV")
+       open(my $FD_PROC_NET_DEV, "<", "$PROC_NET_DEV")
                or die "Could not open $PROC_NET_DEV";
 
        my @ifs = <$FD_PROC_NET_DEV>;
@@ -754,7 +755,7 @@ sub get_local_ip_for_remote_ip {
     if($remote_ip =~ /^(\d\d?\d?\.){3}\d\d?\d?$/) {
         my $PROC_NET_ROUTE= ('/proc/net/route');
 
-        open($FD_PROC_NET_ROUTE, "<", "$PROC_NET_ROUTE")
+        open(my $FD_PROC_NET_ROUTE, "<", "$PROC_NET_ROUTE")
             or die "Could not open $PROC_NET_ROUTE";
 
         my @ifs = <$FD_PROC_NET_ROUTE>;
@@ -858,7 +859,7 @@ sub run_as {
                &main::daemon_log("ERROR: The sudo utility is not available! Please fix this!");
        }
        my $cmd_line= "$sudo_cmd su - $uid -c '$command'";
-       open($PIPE, "$cmd_line |");
+       open(my $PIPE, "$cmd_line |");
        my $result = {'command' => $cmd_line};
        push @{$result->{'output'}}, <$PIPE>;
        close($PIPE);