From: opensides Date: Thu, 1 Oct 2009 21:05:42 +0000 (+0000) Subject: - Added patch for ldap waiting wghen not available X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ba87ac043b09d7d0f515adf5ee6b4d4540d740e4;p=gosa.git - Added patch for ldap waiting wghen not available git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14454 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 4952f04a4..2efd73478 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -63,7 +63,7 @@ my $db_module = "DBsqlite"; no strict "refs"; require ("GOSA/".$db_module.".pm"); ("GOSA/".$db_module)->import; -#daemon_log("0 INFO: importing database module '$db_module'", 1); +daemon_log("0 INFO: importing database module '$db_module'", 1); } my $modules_path = "/usr/lib/gosa-si/modules"; @@ -105,7 +105,7 @@ our $gosa_address; our $no_arp; our $forground; our $cfg_file; -our ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $ldap_server_dn, $ldap_version); +our ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $ldap_server_dn, $ldap_version, $ldap_retry_sec); our ($mysql_username, $mysql_password, $mysql_database, $mysql_host); our $known_modules; our $known_functions; @@ -255,6 +255,7 @@ our $check_periodic = {"months"=>'', "weeks"=>'', "days"=>'', "hours"=>'', "minu "ldap-admin-dn" => [\$ldap_admin_dn, ""], "ldap-admin-password" => [\$ldap_admin_password, ""], "ldap-version" => [\$ldap_version, 3], + "ldap-retry-sec" => [\$ldap_retry_sec, 10], "gosa-unit-tag" => [\$gosa_unit_tag, ""], "max-clients" => [\$max_clients, 10], "wol-password" => [\$wake_on_lan_passwd, ""], @@ -2299,8 +2300,8 @@ sub get_ldap_handle { get_handle: my $ldap_handle = Net::LDAP->new( $ldap_uri ); if (not ref $ldap_handle) { - daemon_log("$session_id ERROR: Connection to LDAP URI '$ldap_uri' failed! Retrying!", 1); - usleep(100000); + daemon_log("$session_id ERROR: Connection to LDAP URI '$ldap_uri' failed! Retrying in $ldap_retry_sec seconds.", 1); + sleep($ldap_retry_sec); goto get_handle; } else { daemon_log("$session_id DEBUG: Connection to LDAP URI '$ldap_uri' established.", 42);