From: rettenbe Date: Mon, 1 Sep 2008 15:46:45 +0000 (+0000) Subject: * new deb version X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a2e99244123a5e5567213b1aed544905a1c50b9d;p=gosa.git * new deb version * preversion of opsi server information sharing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12335 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/client/events/corefunctions.pm b/gosa-si/client/events/corefunctions.pm index d56949064..7af8f4941 100644 --- a/gosa-si/client/events/corefunctions.pm +++ b/gosa-si/client/events/corefunctions.pm @@ -242,7 +242,7 @@ sub new_ntp_config { my @file = ; close FILE; foreach my $line (@file) { - if ($line =~ /^server /) { + if ($line =~ /server /) { if ($found_server_flag) { $line =~ s/^server [\s\S]+$//; } else { @@ -259,7 +259,7 @@ sub new_ntp_config { } # Write changes to file and close it - open (FILE, "+>$chrony_file"); + open (FILE, ">$chrony_file"); print FILE join("", @file); close FILE; &main::daemon_log("INFO: wrote new configuration file: $chrony_file", 5); diff --git a/gosa-si/debian/changelog b/gosa-si/debian/changelog index e3ffb7833..ee3df51ec 100644 --- a/gosa-si/debian/changelog +++ b/gosa-si/debian/changelog @@ -1,4 +1,4 @@ -gosa-si (1.1-2) etch; urgency=low +gosa-si (1.1-1) etch; urgency=low * New upstream version diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 5a1bc3fe1..87c5bafc9 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -1099,7 +1099,11 @@ daemon_log("INFO: gosa-si-client mac address detected: $client_mac_address", 1); # import events my ($error, $result, $tmp_hash) = &import_events($event_dir); -$event_hash = $tmp_hash; +while (my ($module, $mod_event_hash) = each %$tmp_hash) { + while (my ($event_name, $nothing) = each %$mod_event_hash) { + $event_hash->{$event_name} = $module; + } +} foreach my $log_line (@$result) { if ($log_line =~ / succeed: /) { diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 60ff340b7..c2e5a46c0 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -71,7 +71,6 @@ my ($foreground, $ping_timeout); my ($server); my ($gosa_server, $job_queue_timeout, $job_queue_loop_delay); my ($messaging_db_loop_delay); -my ($known_modules); my ($procid, $pid); my ($arp_fifo); my ($xml); @@ -100,6 +99,7 @@ our $verbose; our $forground; our $cfg_file; our ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $ldap_server_dn); +our $known_modules; # specifies the verbosity of the daemon_log $verbose = 0 ; @@ -445,7 +445,7 @@ sub import_modules { my $info = eval($mod_name.'::get_module_info()'); # Only load module if get_module_info() returns a non-null object if( $info ) { - my ($input_address, $input_key, $input, $input_active, $input_type) = @{$info}; + my ($input_address, $input_key, $event_hash) = @{$info}; $known_modules->{$mod_name} = $info; daemon_log("0 INFO: module $mod_name loaded", 5); } @@ -2974,6 +2974,14 @@ sub register_at_foreign_servers { my $myhash = &create_xml_hash('new_server', $server_address, $hostname); &add_content2xml_hash($myhash, 'key', $hostkey); map(&add_content2xml_hash($myhash, 'client', @{$_}[0].",".@{$_}[4]), @$client_res); + + my $loaded_modules = {}; + while (my ($package, $pck_info) = each %$known_modules) { + foreach my $act_module (keys(%{@$pck_info[2]})) { + $loaded_modules->{$act_module} = ""; + } + } + map(&add_content2xml_hash($myhash, "loaded_modules", $_), keys(%$loaded_modules)); # build registration message and send it my $foreign_server_msg = &create_xml_string($myhash); diff --git a/gosa-si/modules/ClientPackages.pm b/gosa-si/modules/ClientPackages.pm index 4b6967566..cfea9ed8a 100644 --- a/gosa-si/modules/ClientPackages.pm +++ b/gosa-si/modules/ClientPackages.pm @@ -152,6 +152,7 @@ $main::server_address = $server_address; sub get_module_info { my @info = ($server_address, $ClientPackages_key, + $event_hash, ); return \@info; } diff --git a/gosa-si/modules/GosaPackages.pm b/gosa-si/modules/GosaPackages.pm index 21a53cdb3..cd8550ba7 100644 --- a/gosa-si/modules/GosaPackages.pm +++ b/gosa-si/modules/GosaPackages.pm @@ -50,6 +50,7 @@ foreach my $log_line (@$result) { sub get_module_info { my @info = ($main::gosa_address, $main::gosa_passwd, + $event_hash, ); return \@info; } diff --git a/gosa-si/modules/GosaSupportDaemon.pm b/gosa-si/modules/GosaSupportDaemon.pm index 9d07d0a0c..f90c149cc 100644 --- a/gosa-si/modules/GosaSupportDaemon.pm +++ b/gosa-si/modules/GosaSupportDaemon.pm @@ -530,7 +530,7 @@ sub import_events { my $event_module = $1; my $events_l = eval( $1."::get_events()") ; foreach my $event_name (@{$events_l}) { - $event_hash->{$event_name} = $event_module; + $event_hash->{$event_module}->{$event_name} = ""; } my $events_string = join( ", ", @{$events_l}); push(@result, "import of event module '$event' succeed: $events_string"); diff --git a/gosa-si/modules/ServerPackages.pm b/gosa-si/modules/ServerPackages.pm index 66184387d..7a1357dc7 100644 --- a/gosa-si/modules/ServerPackages.pm +++ b/gosa-si/modules/ServerPackages.pm @@ -33,7 +33,8 @@ foreach my $log_line (@$result) { sub get_module_info { my @info = ($main::server_address, - $main::ServerPackages_key, + $main::ServerPackages_key, + $event_hash, ); return \@info; }