summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d3a67c4)
raw | patch | inline | side by side (parent: d3a67c4)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Sep 2008 15:46:45 +0000 (15:46 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Sep 2008 15:46:45 +0000 (15:46 +0000) |
* preversion of opsi server information sharing
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12335 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12335 594d385d-05f5-0310-b6e9-bd551577e9d8
index d569490648f9e03a054b3793b1aa40fdbacd8eea..7af8f4941b42a8d098260696d0b695c1dc21d391 100644 (file)
my @file = <FILE>;
close FILE;
foreach my $line (@file) {
- if ($line =~ /^server /) {
+ if ($line =~ /server /) {
if ($found_server_flag) {
$line =~ s/^server [\s\S]+$//;
} else {
}
# 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);
index e3ffb783351d816d52cd7005448b82288276c29b..ee3df51ecd9600644586eaa4c72b18d03cdbd14f 100644 (file)
--- a/gosa-si/debian/changelog
+++ b/gosa-si/debian/changelog
-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 5a1bc3fe1aa95016ac758f762241edeac2be1211..87c5bafc92595f3c26bf84fedf15f25b8ce35857 100755 (executable)
--- 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 60ff340b73325f6f5109b10f1e25082ff9db058f..c2e5a46c001180577255fc96920ba354bab75add 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
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);
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 ;
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);
}
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);
index 4b69675660732eef7304095320d3bba188811708..cfea9ed8a87b0d787efdd1b471af111fb5d2837b 100644 (file)
sub get_module_info {
my @info = ($server_address,
$ClientPackages_key,
+ $event_hash,
);
return \@info;
}
index 21a53cdb390c7dcea66e55a7c6bb392b6d469f7a..cd8550ba77505538dab8bbf6b30837af090092df 100644 (file)
sub get_module_info {
my @info = ($main::gosa_address,
$main::gosa_passwd,
+ $event_hash,
);
return \@info;
}
index 9d07d0a0cea6bcfba2b805d5ef8f806dfd04c116..f90c149cc35f52a310b41bb80f0c035177f7dadc 100644 (file)
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");
index 66184387d0749ccb33d2f1feb63a054ab9c3c447..7a1357dc77e6725210de444cfd9a8c9ed285a722 100644 (file)
sub get_module_info {
my @info = ($main::server_address,
- $main::ServerPackages_key,
+ $main::ServerPackages_key,
+ $event_hash,
);
return \@info;
}