summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e7086e)
raw | patch | inline | side by side (parent: 9e7086e)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 Nov 2008 08:25:19 +0000 (08:25 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 Nov 2008 08:25:19 +0000 (08:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12861 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 22986304d2a08b184e1eaaed98d22bbf65f44645..371fc8a6e563c0258260584b3cfdb98ed5ffbf9d 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
&& $not_found_in_known_server_db
&& $not_found_in_known_clients_db) {
&daemon_log("$session_id DEBUG: target is not in foreign_clients_db, known_server_db or known_clients_db, maybe it is a complete new one -> process here", 7);
+ if ($header =~ /^gosa_/ || $header =~ /^job_/) {
+ $module = "GosaPackages";
+ }
my $res = $incoming_db->add_dbentry( {table=>$incoming_tn,
primkey=>[],
headertag=>$header,
my %receiver_h;
foreach my $receiver (@message_to_l) {
if ($receiver =~ /^u_([\s\S]*)$/) {
- $receiver_h{$1} = 0;
+ $receiver_h{$receiver} = 0;
} elsif ($receiver =~ /^g_([\s\S]*)$/) {
my $group_name = $1;
# fetch all group members from ldap and add them to receiver hash
#&daemon_log("0 DEBUG: $sql", 7);
my $res = $login_users_db->exec_statement($sql);
- # reciver is logged in nowhere
+ # receiver is logged in nowhere
if (not ref(@$res[0]) eq "ARRAY") { next; }
+ # receiver ist logged in at a client registered at local server
my $send_succeed = 0;
foreach my $hit (@$res) {
my $receiver_host = @$hit[0];
index 0e9c69b9646a70ecdf6edfb7ec2516365d67b4c8..5f23c351a0390a3bb0fb21519eef54869cf6c54a 100644 (file)
my $res;
my $error_str;
- # Invoke set_last_system
+ # Invoke set_last_system; message sets ldap attributes 'gotoLastSystemLogin' and 'gotoLastSystem'
$res = &set_last_system($msg, $msg_hash, $session_id);
my %add_hash = ( table=>$main::login_users_tn,
return;
}
- # Invoke set_last_system
+ # Invoke set_last_system; message sets ldap attributes 'gotoLastSystemLogin' and 'gotoLastSystem'
my $res = &set_last_system($msg, $msg_hash, $session_id);
# fetch all user currently assigned to the client at login_users_db
&main::daemon_log("$session_id INFO: delete user '".$hit->{'user'}."' at client '".$hit->{'client'}."' from login_user_db", 5);
}
+ # TODO
+ # Inform all other server which users are logged in at clients registered at local server
+
+ # sende allen anderen server eine nachricht, "foreign_user_updates" zum beispiel
+
return;
}
## @method set_last_system()
-# @details Message set ldap attributes 'gotoLastSystemLogin' and 'gotoLastSystem'
+# @details Message sets ldap attributes 'gotoLastSystemLogin' and 'gotoLastSystem'
# @param msg - STRING - xml message with tag 'last_system_login' and 'last_system'
# @param msg_hash - HASHREF - message information parsed into a hash
# @param session_id - INTEGER - POE session id of the processing of this message
$header =~ s/CLMSG_//g;
my $sql_statement = "UPDATE $main::job_queue_tn ".
- "SET status='processing', progress='goto-activation', modified='1' ".
+ "SET progress='goto-activation', modified='1' ".
"WHERE status='processing' AND macaddress LIKE '$macaddress'";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->update_dbentry($sql_statement);
index 5e1a084781832123ab1698cb12e995ab80da9969..e62c86a26239637f9450a557ac5e886343428905 100644 (file)
# keep job queue uptodate if necessary
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my ($sql, $res);
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
$host_key = @{@$res[0]}[2];
} else {
&main::daemon_log("$session_id ERROR: cannot determine host_name and host_key from known_clients_db at function ping\n$msg", 1);
- my %data = ( 'answer_xml' => 'host not found in known_clients_db',
- 'macaddress' => $target,
- );
- $answer_msg = &build_msg("got_ping_error", $main::server_address, $source, \%data);
$error = 1;
}
my $target = @{$msg_hash->{target}}[0];
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
# update status of job
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
&main::change_goto_state('locked', \@{$msg_hash->{macaddress}}, $session_id);
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
&main::change_goto_state('active', \@{$msg_hash->{macaddress}}, $session_id);
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
&main::change_fai_state('localboot', \@{$msg_hash->{macaddress}}, $session_id);
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
&main::change_fai_state('reboot', \@{$msg_hash->{macaddress}}, $session_id);
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
&main::change_fai_state('memcheck', \@{$msg_hash->{macaddress}}, $session_id);
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
&main::change_fai_state('reinstall', \@{$msg_hash->{macaddress}}, $session_id);
- my %data = ( 'macAddress' => \@{$msg_hash->{macaddress}} );
+ my %data = ( 'macaddress' => \@{$msg_hash->{macaddress}} );
my $wake_msg = &build_msg("trigger_wake", "GOSA", "KNOWN_SERVER", \%data);
# invoke trigger wake for this gosa-si-server
&main::server_server_com::trigger_wake($msg, $msg_hash, $session_id);
&main::change_fai_state('update', \@{$msg_hash->{macaddress}}, $session_id);
- my %data = ( 'macAddress' => \@{$msg_hash->{macaddress}} );
+ my %data = ( 'macaddress' => \@{$msg_hash->{macaddress}} );
my $wake_msg = &build_msg("trigger_wake", "GOSA", "KNOWN_SERVER", \%data);
# invoke trigger wake for this gosa-si-server
&main::server_server_com::trigger_wake($msg, $msg_hash, $session_id);
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
- my %data = ( 'macAddress' => \@{$msg_hash->{macaddress}} );
+ my %data = ( 'macaddress' => \@{$msg_hash->{macaddress}} );
my $wake_msg = &build_msg("trigger_wake", "GOSA", "KNOWN_SERVER", \%data);
# invoke trigger wake for this gosa-si-server
&main::server_server_com::trigger_wake($msg, $msg_hash, $session_id);
&main::change_fai_state('sysinfo', \@{$msg_hash->{macaddress}}, $session_id);
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
my $jobdb_id = @{$msg_hash->{'jobdb_id'}}[0];
if( defined $jobdb_id) {
- my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=jobdb_id";
+ my $sql_statement = "UPDATE $main::job_queue_tn SET status='processed' WHERE id=$jobdb_id";
&main::daemon_log("$session_id DEBUG: $sql_statement", 7);
my $res = $main::job_db->exec_statement($sql_statement);
}
index e1fd6486f0315fb9956888dc1b72cb53163e5e42..c75b79f402551aa47cc71506cd609cf8702ea942 100644 (file)
# Build wakeup message for client
if (not $error) {
my $wakeup_hash = &create_xml_hash("trigger_wake", "GOSA", "KNOWN_SERVER");
- &add_content2xml_hash($wakeup_hash, 'macAddress', $macaddress);
+ &add_content2xml_hash($wakeup_hash, 'macaddress', $macaddress);
my $wakeup_msg = &create_xml_string($wakeup_hash);
push(@out_msg_l, $wakeup_msg);