summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c6b9ce0)
raw | patch | inline | side by side (parent: c6b9ce0)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Feb 2008 10:24:53 +0000 (10:24 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Feb 2008 10:24:53 +0000 (10:24 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9009 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/modules/GosaPackages.pm | patch | blob | history | |
gosa-si/modules/SIPackages.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index fee7b719953e8ad14f72305bc3163e4a4aadb622..0c962c8eac7aa2bb839a23f0d3786920f75ffe30 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
system('rm -f /tmp/gosa_si_lock*gosa-si-client*');
# detect ip and mac address and complete host address
+#if( inet_aton($client_ip) ){
+#print STDERR "ip: $client_ip\n";
+# $client_ip = inet_ntoa(inet_aton($client_ip));
+#print STDERR "ip: $client_ip\n";
+#}
$client_address = $client_ip.":".$client_port;
my $network_interface= &get_interface_for_ip($client_ip);
$client_mac_address= &get_mac($network_interface);
@@ -1359,6 +1364,11 @@ daemon_log("start socket for incoming xml messages at port '$client_port' ", 1);
# prepare variables
+if( inet_aton($server_ip) ){ $server_ip = inet_ntoa(inet_aton($server_ip)); }
+############################################################
+# to change
+if( $server_ip eq "127.0.1.1" ) { $server_ip = "127.0.0.1" }
+############################################################
if (defined $server_ip && defined $server_port) {
$server_address = $server_ip.":".$server_port;
}
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index c445ad4c7d672928b9c0be34c5234dab2536f479..4ea7bdbabe92a0f3b11276d6df567df426171ef9 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
"activ" => [\$bus_activ, "true"],
},
"server" => {
-# "ip" => [\$server_ip, "0.0.0.0"],
+# "ip" => [\$server_ip, "0.0.0.0"],
"port" => [\$server_port, "20081"],
"known-clients" => [\$known_clients_file_name, '/var/lib/gosa-si/clients.db' ],
"known-servers" => [\$known_server_file_name, '/var/lib/gosa-si/servers.db'],
while( my ($hit_num, $hit) = each %{ $query_res } ) {
my $host_name = $hit->{hostname};
if( not $host_name =~ /^$remote_ip:\d*$/) {
- next;
+ next;
}
my $host_key = $hit->{hostkey};
&daemon_log("SIPackages: known_client host_name: $host_name", 7);
# add sqlite_id
$job_msg =~ s/<\/xml>$/<jobdb_id>$jobdb_id<\/jobdb_id><\/xml>/;
-
-print STDERR "=======================================================\n$job_msg\n";
-
&send_msg_to_target($job_msg, $server_address, $GosaPackages_key, $header);
# my $error = 1;
index 8314850c7528de65485f44b2afd7b1c68e8e5f56..7e5eb63f5010a9921325181ea91f7581236fa37c 100644 (file)
use warnings;
use GOSA::GosaSupportDaemon;
use IO::Socket::INET;
+use Socket;
use XML::Simple;
use File::Spec;
use Data::Dumper;
$gosa_mac_address= &get_mac($network_interface);
# complete addresses
+if( inet_aton($server_ip) ){ $server_ip = inet_ntoa(inet_aton($server_ip)); }
our $server_address = "$server_ip:$server_port";
+if( inet_aton($gosa_ip) ){ $gosa_ip = inet_ntoa(inet_aton($gosa_ip)); }
my $gosa_address = "$gosa_ip:$gosa_port";
# create general settings for this module
if (defined ($out_msg) && $out_msg =~ /<jobdb_id>(\d+)<\/jobdb_id>/) {
my $job_id = $1;
my $sql = "UPDATE '".$main::job_queue_table_name."'".
- " SET status='done'".
+ " SET status='processing'".
" WHERE id='$job_id'";
my $res = $main::job_db->exec_statement($sql);
}
my $where= &get_where_statement($msg, $msg_hash);
my $update= &get_update_statement($msg, $msg_hash);
- my $sql_statement = "UPDATE $table $update $where";
+ # conditions
+ # no timestamp update if status eq waiting
+
+ my $sql_statement = "UPDATE $table $update $where";
# execute db query
my $db_res = $main::job_db->update_dbentry($sql_statement);
index 4dcc734acfc2f25effb284f5336f91dab3edc903..d78915395eea8918a6c2e472dbd8792e6a2b3ff2 100644 (file)
# read configfile and import variables
&read_configfile();
+
+# if server_ip is not an ip address but a name
+if( inet_aton($server_ip) ){ $server_ip = inet_ntoa(inet_aton($server_ip)); }
$network_interface= &get_interface_for_ip($server_ip);
$server_mac_address= &get_mac($network_interface);
#if( $server_ip eq "0.0.0.0" ) {
# $server_ip = "127.0.0.1";
#}
+
my $server_address = "$server_ip:$server_port";
$main::server_address = $server_address;
+
+
+if( inet_aton($bus_ip) ){ $bus_ip = inet_ntoa(inet_aton($bus_ip)); }
+######################################################
+# to change
+if( $bus_ip eq "127.0.1.1" ) { $bus_ip = "127.0.0.1" }
+######################################################
my $bus_address = "$bus_ip:$bus_port";
$main::bus_address = $bus_address;