summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 17ff65b)
raw | patch | inline | side by side (parent: 17ff65b)
author | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 27 Mar 2010 23:39:31 +0000 (23:39 +0000) | ||
committer | opensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 27 Mar 2010 23:39:31 +0000 (23:39 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17321 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/ClientPackages.pm | patch | blob | history |
index fb8aab830dd33adcc62e5226f235e304b16f934c..8fc6318bcf69b87dfd021adf2558e858c0eed3e4 100644 (file)
package ClientPackages;
-use Exporter;
-@ISA = ("Exporter");
-
# Each module has to have a function 'process_incoming_msg'. This function works as a interface to gosa-sd and receives the msg hash from gosa-sd. 'process_incoming_function checks, wether it has a function to process the incoming msg and forward the msg to it.
use strict;
use warnings;
+
+use Exporter;
use GOSA::GosaSupportDaemon;
use IO::Socket::INET;
use XML::Simple;
use Socket;
use Net::hostent;
+@ISA = ("Exporter");
+
my $event_dir = "/usr/lib/gosa-si/server/ClientPackages";
use lib "/usr/lib/gosa-si/server/ClientPackages";
if ( defined($msg_hash->{'force-hostname'}[0]) &&
length($msg_hash->{'force-hostname'}[0]) > 0){
# $heap->{force-hostname}->{$mac_address}= $msg_hash->{'force-hostname'}[0];
- open (TFILE, ">/var/tmp/$mac_address");
- print TFILE $msg_hash->{'force-hostname'}[0];
- close (TFILE);
+ open ($TFILE, ">", "/var/tmp/$mac_address");
+ print $TFILE $msg_hash->{'force-hostname'}[0];
+ close ($TFILE);
} else {
# $heap->{force-hostname}->{$mac_address}= undef;
if ( -e "/var/tmp/$mac_address") {
} else {
my $PROC_NET_ROUTE= ('/proc/net/route');
- open(PROC_NET_ROUTE, "<$PROC_NET_ROUTE")
+ open($FD_PROC_NET_ROUTE, "<", "$PROC_NET_ROUTE")
or die "Could not open $PROC_NET_ROUTE";
- my @ifs = <PROC_NET_ROUTE>;
+ my @ifs = <$FD_PROC_NET_ROUTE>;
- close(PROC_NET_ROUTE);
+ close($FD_PROC_NET_ROUTE);
# Eat header line
shift @ifs;