summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9246936)
raw | patch | inline | side by side (parent: 9246936)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 Mar 2008 11:18:26 +0000 (11:18 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 Mar 2008 11:18:26 +0000 (11:18 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9988 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/server/events/logHandling.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index cb759af22cdd18b31ae4d14ab575408d268cc7b2..3522b8fb63d4e73773a86d722f216cfe8ef6b5f5 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
my ($kernel) = $_[KERNEL];
&trigger_db_loop($kernel);
$global_kernel = $kernel;
- $kernel->yield('create_fai_server_db', $fai_server_tn );
- $kernel->yield('create_fai_release_db', $fai_release_tn );
+ #################################
+ # out commented, just for testing
+ #$kernel->yield('create_fai_server_db', $fai_server_tn );
+ #$kernel->yield('create_fai_release_db', $fai_release_tn );
$kernel->sig(USR1 => "sig_handler");
}
if ($session_id == 0) {
daemon_log("$session_id DEBUG: get_ldap_handle invoked without a session_id, create a new ldap_handle", 7);
$ldap_handle = Net::LDAP->new( $ldap_uri );
+ $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password);
} else {
my $session_reference = $global_kernel->ID_id_to_session($session_id);
if (not exists $heap->{ldap_handle}) {
# create new ldap handle
$ldap_handle = Net::LDAP->new( $ldap_uri );
+ $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password);
# add ldap handle to heap
$heap->{ldap_handle} = $ldap_handle;
}
}
-
-
return $ldap_handle;
}
my $state= $mapActions{ $st };
- my $ldap_handle = get_ldap_handle($session_id);
+ my $ldap_handle = &get_ldap_handle($session_id);
if( defined($ldap_handle) ) {
# Build search filter for hosts
index 8b9af8f743a640fce72b89260e39a26fa3fcf16b..07e8c1adf2239ebb0d82a004db1bd056a5c7a834 100644 (file)
my $source = @{$msg_hash->{source}}[0];
my $date_l = $msg_hash->{date};
+ #my $date_h;
+ #map {$date_h->{$_}++} @{$date_l};
if (not -d $main::client_fai_log_dir) {
&main::daemon_log("$session_id ERROR: client fai log directory '$main::client_fai_log_dir' do not exist", 1);
opendir(DIR, $main::client_fai_log_dir);
my @avail_macs = readdir(DIR);
closedir(DIR);
-
+
+ # goto each mac directory
+ # select all dates which matches the parameter dates
+ my %res_h;
+ foreach my $date ($date_l) {
+
+ # go through all mac addresses
+ foreach my $mac (@avail_macs) {
+ my $mac_dir = File::Spec->catdir($main::client_fai_log_dir, $mac);
+
+ opendir(DIR, $mac_dir);
+ my @avail_dates = readdir(DIR);
+ closedir(DIR);
+
+ # go through all dates of one mac address
+ foreach my $avail_date (@avail_dates) {
+ if ($avail_date =~ /$date/i) {
+ if (not exists %res)
+ push(%res_h->{$mac}, );
+ }
+ }
+ }
+ }
+
}
sub show_log_by_mac {